FontFamilyComboBox - get selected Font

Ribbon for WPF Forum

Posted 16 years ago by sinamine
Version: 1.0.0347
Avatar

Hey eyeryone!

How is it possible to get the selected FontFamily from the FontFamilyComboBox?

I hope somebody could help me.

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Certainly, this code will get you the selected font family:
ComboBoxItem item = ((ComboBox)test.Content).SelectedItem as ComboBoxItem;
if (item != null) {
    FontFamily fontFam = item.Content as FontFamily;
}
In the next major version we are going to try and make this a little simpler too.


Actipro Software Support

The latest build of this product (v23.1.3) was released 17 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.