Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows phone 7 将Visibility更改为richboxtext内联线_Windows Phone 7_Visibility_Paragraph - Fatal编程技术网

Windows phone 7 将Visibility更改为richboxtext内联线

Windows phone 7 将Visibility更改为richboxtext内联线,windows-phone-7,visibility,paragraph,Windows Phone 7,Visibility,Paragraph,您好,我注意到Microsoft没有为其段落对象包含可见性属性, 所以我想创造一个属于我自己的。 有什么建议吗 如果查看段落的类层次结构,您将看到它不支持可见性的原因: System.Object System.Windows.DependencyObject System.Windows.Documents.TextElement System.Windows.Documents.Block System.Windows.Documents.Paragr

您好,我注意到Microsoft没有为其段落对象包含可见性属性, 所以我想创造一个属于我自己的。
有什么建议吗

如果查看
段落
的类层次结构,您将看到它不支持可见性的原因:

System.Object
  System.Windows.DependencyObject
    System.Windows.Documents.TextElement
      System.Windows.Documents.Block
        System.Windows.Documents.Paragraph
它不是从
UIElement
FrameworkElement
继承的<代码>段落,而其他块元素是由
RichTextBox
用于呈现内容的轻型模型对象,它们不会像您通常在XAML中使用的其他元素那样添加到可视化树中


因此,您将无法创建自己的可见性属性!唯一的选择是删除隐藏的段落,以便控件重新呈现。

因此,我想如果我真的需要该功能,我必须自己构建一个richTextBox类