Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding on dynamicRes are not updating #4492

Open
TheCamel opened this issue Jun 13, 2024 · 1 comment
Open

Binding on dynamicRes are not updating #4492

TheCamel opened this issue Jun 13, 2024 · 1 comment
Labels

Comments

@TheCamel
Copy link

TheCamel commented Jun 13, 2024

localize is not working in our app

We use strings in dictionnary and all elements are refreshed into the new strings when we change the dictionnary but not the datagrid headers (not mahapps) and the hamburger menu... Tabs are working with some other controls

Steps to reproduce

with the demo app, include the stringManager joined

and 2 dictionnaries in the folder \Resources\XAML\Languages
change as resource

include one of them by default in the app.xaml

<ResourceDictionary Source="/MahApps.Metro.Demo;Component/Resources/XAML/Languages/Strings.fr-FR.xaml" />

bind a menuitem to a string in HamburgerMenuDefault.xaml

<mah:HamburgerMenuGlyphItem Glyph="/Assets/Photos/GiantSlabInOregon.png"
                            Label="{DynamicResource AdminView.LineView}" />

and bind also the tabs in HamburgerMenuSample.xaml


<TabItem Header="{DynamicResource Schedule.Auto}">
    <exampleViews:HamburgerMenuDefault DataContext="{Binding}" />
</TabItem>
<TabItem Header="{DynamicResource Schedule.Manu}">
    <exampleViews:HamburgerMenuCreatorsUpdate DataContext="{Binding}" />
</TabItem>

in the app start call to change the culture from FR to US

protected override void OnStartup(StartupEventArgs e)
{
    base.OnStartup(e);
    StringManager.Instance.SetCulture("en-US");
}

bind a command in the menu to change back

this.ShowProgressDialogCommand = new SimpleCommand<object>(o => true, x => StringManager.Instance.SetCulture("fr-FR") ); //this.RunProgressFromVm()

work in the tabs but not in the hamburger

Environment

MahApps.Metro version: all last RC
Target Core 8
@TheCamel TheCamel added the Bug label Jun 13, 2024
@TheCamel
Copy link
Author

StringManager.zip

file attached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant