What does the "run text" tag mean in XAML?
It kind of just appeared in the XAML apparently put there by expression blend. When I do a winmerge, I noticed it from a previous release of the code.
Old:
<TextBlock VerticalAlignment="Bottom" Height="20" >^</TextBlock>
New:
<TextBlock VerticalAlignment="Bottom" Height="20" ><Run Text="^"/></TextBlock>
TextBlock contains an Inlines collection
TextBlock.Inlines Property
Run is a type of Inline
Run is inline-level flow content
This is an example of multiple Inlines
<TextBlock Grid.Row="3" Name="myText" TextWrapping="Wrap">
I go
<LineBreak/>
<Run FontStyle="Italic" Text="home"/>
</TextBlock>
A TextBlock
can have more than just text as its content, it could be other controls. In your new version the content of the TextBlock
is a System.Windows.Documents.Run
with its Text
property set to ^
.
This was likely done by Expression Blend because ^
could be considered a control character in some cases. By putting the text inside a Run
it removes any ambiguity that the ^
is text and not some control character. When dealing with a complex designer it is always best to remove as much ambguitity as possible so Blend likely just did it to make it easier on its own parsing engine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With