Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

BInding Rich Text box to a string property

$
0
0

Dear all,

I have in my ViewModel a string property call Description.
That string can have normal text string but sometimes can contains some HTML formatting.

Actually I have a TextBlock.Text property which is databind to this Description property.

Then I am trying to use the RichText box of the Extended WPF tool kit which have a Text property that I use in similar way as my normal textbox as bellow:

<tk:RichTextBox Margin="2,0,5,2" BorderBrush="{x:Null}" Text="{Binding Description,UpdateSourceTrigger=PropertyChanged}"  ><tk:RichTextBox.TextFormatter><tk:PlainTextFormatter /></tk:RichTextBox.TextFormatter></tk:RichTextBox>

But doing so my Text property is empty and nothing gets display.

Did I miss something ?

regards


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>