VerenaJam

VerenaJam

  • NA
  • 94
  • 3.6k

change one fontface to another fontface in c# wpf

Oct 15 2014 7:31 AM
I want to change one LTibetan fontface to Arial black fontface in c# WPF but rest Fontfaces are remains same as. I have used below code to achieve the purpose:So anybody kindly give me a help

void ChangeFontFamily(object sender, RoutedEventArgs e)
        {
            FontFamily ffamily = new FontFamily();
            ffamily = btn2.FontFamily;
            ffamily = richTextBox1.FontFamily;
           string str = ffamily.ToString();
           if (str == ("LTibetan"))
            {
                btn2.FontFamily = new FontFamily("Arial Black");
                richTextBox1.FontFamily = new FontFamily("Arial Black");
                btn2.Content = " Arial Black";
                        }

Answers (1)