Hi everyone,
I'm learning WPF (just starting).
This is my problem
I have created two user control which are a menu in french and a menu in english
I will later create a method to change the language used in my application depending on the user preferences.
Now I successfully display a menu in french or english depending on the value of my variable languageToUse
However I will also give the possibility to the user to choose the font he wants for all the
UIElement
s.
The menu now is contained into
spreadsheetMenu
, the font is contained into
fontToUse
and
fontSizeToUse
.
I'm looking to bind the font (
fontToUse
) and the fontSize (
fontSizeToUse
) to the menu (
spreadsheetMenu
).
Or do I have to bind all the menus English and French to the variables
fontToUse
and
fontSizeToUse
?
Anyone can help?
if (fontToUse == null)
{
fontToUse = fontFamilyPerDefault;
}
if (fontSizeToUse == 0)
{
fontSizeToUse = fontSizePerDefault;
}
if (languageToUse == "English")
{
spreadsheetMenu = new Menus.MenuInEnglish();
MenuPanel.Children.Add(spreadsheetMenu);
}
Here should be binding The
fontToUse
and
fontSizeToUse
to the
spreadsheetMenu
.
That's what I'm looking for
Thanks in advance for your help