I'm trying to bind a rich content (RTF format) to a rich text box (of Extended WPF Toolkit) via its Text property like this
<extToolkit:RichTextBox x:Name="rtbKIContent" Margin="8,8,8,8" 
                                    IsEnabled="{Binding IsEditable}"
                                    Text="{Binding Content}">
                <extToolkit:RichTextBox.TextFormatter>
                    <extToolkit:RtfFormatter></extToolkit:RtfFormatter>
                </extToolkit:RichTextBox.TextFormatter>
                <extToolkit:RichTextBoxFormatBarManager.FormatBar>
                    <extToolkit:RichTextBoxFormatBar />
                </extToolkit:RichTextBoxFormatBarManager.FormatBar>
</extToolkit:RichTextBox>
Sometimes it works just fine, but there are circumstances that they just display the text vertically like this.

I don't know what's wrong with it...What should I do to make it display text from left to right like normal?
If you add a width to the RichTextBox, it should fix it.
I did this so it binds to the parent.
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Grid, AncestorLevel=1}, Path=ActualWidth}"
Note you will have to determine AncestorType for you. But you can do this too. Width="100"
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