Font size mismatch between RichTextBox and Word

I have a small WPF application that hosts a RichTextBox:

<RichTextBox SpellCheck.IsEnabled="True" FontFamily="Verdana" AcceptsTab="True" AcceptsReturn="True" FontSize="14" /> 

As the code snippet shown above, I set the font size to 14. If I copy the text from this RichTextBox to Microsoft Word or Microsoft WordPad, the font size will be 10.5. Similar oddities persist if I insert text from Word or WordPad. I confirmed that the text selected from my application has size 14. Any help would be greatly appreciated!

+6
wpf richtextbox
source share
1 answer

Using FontSize and assigning a prime means that the unit is pixels. Instead, try setting Fontsize="14pt" .

Other units: px , in , cm .

+7
source share

All Articles