Windows phone 7 将Visibility更改为richboxtext内联线
您好,我注意到Microsoft没有为其段落对象包含可见性属性, 所以我想创造一个属于我自己的。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
有什么建议吗 如果查看
段落
的类层次结构,您将看到它不支持可见性的原因:
System.Object
System.Windows.DependencyObject
System.Windows.Documents.TextElement
System.Windows.Documents.Block
System.Windows.Documents.Paragraph
它不是从UIElement
或FrameworkElement
继承的<代码>段落,而其他块元素是由RichTextBox
用于呈现内容的轻型模型对象,它们不会像您通常在XAML中使用的其他元素那样添加到可视化树中
因此,您将无法创建自己的可见性属性!唯一的选择是删除隐藏的段落,以便控件重新呈现。因此,我想如果我真的需要该功能,我必须自己构建一个richTextBox类