Binding Run inside Textblock throws exception in WPF
I am trying to link the two <Run>
internally TextBlock
as shown in the snippet below. But I am getting XamlParseException
.
Basically I am trying to achieve this format:
CodeNum: LongDescription
If the code below is doomed to fail, what other alternatives do I have?
<TextBlock>
<Run FontWeight="Bold" Text="{Binding CodeNum}"/>
<Run FontWeight="Bold" Text=": "/>
<Run Text="{Binding LongDescription}"/>
</TextBlock>
+3
source to share