In my simple Silverlight class assignment...
the last method :

FontFamily verdanaFnt= new FontFamily("Verdana");

myRichTextBox.Selection.ApplyPropertyValue (Run.FontFamilyProperty,verdanaFnt)

The problem is that it changes the FontFamily of the whole RTB including the non-selected parts.

It behaves kinda like:

myRichTextBox.FontFamily=verdanaFnt;

What i am I doing wrong?

myRichTextBox.SelectionFont = new Font( currentFont.FontFamily, currentFont.Size, newFontStyle);

try using this instead of line# 3

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.