I want to bind the FontFamily of a TextBox to a property I created on my ViewModel
Here's my XAML :
<TextBox Text="Test Font Binding" FontFamily="{Binding FontFirstContent}" />
And here the property in my ViewModel :
public FontFamily FontFirstContent
{
get { return new FontFamily("Verdana"); }
}
When the view is loaded, the getter of the property is correctly firing but it's not passed on the view. All bindings on my view are working except this one, so i don't understand what's wrong with it ?
Edit : Okay it works fine ! I was just working on the wrong FontFamily object.. I've used :
System.Drawing.FontFamily
But the FontFamily must be of type :
System.Windows.Media.FontFamily