Textblock is mainly used to display text. For example:
<Textblock name = "txtblockoutpumessage" text = "hello"/>
Textblock does not automatically wrap text by default. If you want textblock to wrap text, you can set the attribute textwrapping = "Wrap ".
Textblock can actually add many sub-elements, such:
<Textblock name = "txtblockoutpumessage" text = "test"> <br/> <linebreak/> <br/> <run foreground = "maroon" fontfamily = "Courier New" fontsize = "24"> Hello </run> <br/> <linebreak/> <br/> <run> the </run> <br/> <linebreak/> <br/> <run> world </run> <br/> </textblock> <br/>
ADD child elements in the background
Txtblockoutpumessage. inlines. add (New linebreak (); <br/> txtblockoutpumessage. inlines. add (new run ("Hello the world"); <br/> txtblockoutpumessage. inlines. add (New linebreak (); <br/> txtblockoutpumessage. inlines. add (new run ("Hello the world "));