February 2013
Beginner to intermediate
68 pages
1h 50m
English
In .NET 4.0, WPF introduced bindable Runs. A Run object allows you to display formatted text inside flow documents (the FlowDocument object). In the latest version, text can come from other controls, resources, or data-bound sources. Let’s see an example in which a Run object can show, via data-binding, the result of typing text inside a TextBox control, reflecting the content inside the FlowDocument:
<StackPanel> <TextBox Name="TextBox1"/> <FlowDocumentReader> <FlowDocument> <Paragraph> <Run Text="This is a bindable run demo"/> <Run Text="{Binding ElementName=TextBox1, Path=Text}"/> </Paragraph> </FlowDocument> </FlowDocumentReader></StackPanel> ...