html formatting in dynamic text
Posted: 08 Apr 2021, 23:57
Hello,
There some cool formatting options here: https://www.noesisengine.com/docs/Gui.C ... orial.html
However, these don't seem to work via bindings defined as so:
When "thatReallyLongText" is set to:
Xaml gets very unhappy when I to use formatting tags directly in text ala:
I have to reformat it to:
However, I'm not terribly sure how to bind it to thatReallyLongText then .. Edit figured it out, but still no html parsing.
Question: I'm wondering what are our options for formatting a text that gets set via a binding?
Edit: Reformating via <textblock> binding didn't work ether, <bold> still just shows up as plain text.
There some cool formatting options here: https://www.noesisengine.com/docs/Gui.C ... orial.html
However, these don't seem to work via bindings defined as so:
Code: Select all
<TextBlock TextWrapping="Wrap"
Style="{StaticResource BodyTextBlock}"
Text="{Binding thatReallyLongText}"
/>
It just shows up with <Bold> right in the text.<Bold>Lorem ipsum dolor sit amet, </Bold> consectetur adipiscing elit. Donec scelerisque justo enim,
Xaml gets very unhappy when I to use formatting tags directly in text ala:
Code: Select all
<TextBlock TextWrapping="Wrap"
Style="{StaticResource BodyTextBlock}"
Text="<Bold>Lorem ipsum dolor sit amet, </Bold> consectetur adipiscing elit. Donec scelerisque justo enim"
/>
Code: Select all
<TextBlock TextWrapping="Wrap"
Style="{StaticResource BodyTextBlock}">
<Bold>Lorem ipsum dolor sit amet, </Bold> consectetur adipiscing elit. Donec scelerisque justo enim"
<TextBlock/>
Question: I'm wondering what are our options for formatting a text that gets set via a binding?
Edit: Reformating via <textblock> binding didn't work ether, <bold> still just shows up as plain text.
Code: Select all
<TextBlock TextWrapping="Wrap"
Style="{StaticResource BodyTextBlock}">
<TextBlock.Text>
{Binding thatReallyLongText}
</TextBlock.Text>
</TextBlock>