Hi I have noticed that Microsoft did not include a visibility property to their paragraph object,
So I want to create one of my own.
Any suggestions of how to do so?
Hi I have noticed that Microsoft did not include a visibility property to their
Share
If you look at the class hierarchy for
Paragraphyou will see why it does not support visibility:It does not inherit from
UIElementorFrameworkElement.Paragraph, and the other Block elements are lightweight model objects that are used by theRichTextBoxto render the content, they do not get added to the visual tree like other elements you would typically use within XAML.For this reason you are not going to be able to create your own visibility property! The only option is to remove the hidden paragraph so that the control re-renders.