Run.Text Property
Gets or sets the text contents of the Run.
Namespace: System.Windows.Documents
Assembly: System.Windows (in System.Windows.dll)
<Run ...>text</Run>
<Run Text="text"/>
Property Value
Type: System.StringA string that specifies the text contents of the Run. The default is String.Empty.
Any leading or trailing white space is not preserved when you set the Text property in XAML or in code.
When you set text in a TextBlock or a Run, it is not necessary to explicitly specify the Text property in XAML. Instead, you can put the text directly within the element, as shown in the following example.
<TextBlock>Hello, world!</TextBlock> <TextBlock> <TextBlock.Inlines> <Run>Hello again, world!</Run> </TextBlock.Inlines> </TextBlock>
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.