I have such ListView
...
<ListView
x:Name="LVLog"
ToolTip="Log of task(s) execution"
Background="WhiteSmoke"
HorizontalAlignment="Stretch"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
VerticalAlignment="Stretch">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" TextWrapping="Wrap"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
...
There is how I set items
LVLog.Items.Add(message.Log);
And there ToString()
method of object that I try to bind
public override string ToString() => string.Format("You are <span style='color:red'>{0}</span> km. in city <span style='color:red'>{1}</span> km.", 100, 136);
So, I expect to get 100 and 136 in red color, but actually I get this
What am I doing wrong? Why it does not format text as expected?