MahApps / MahApps/MahApps.Metro
Binding on dynamicRes are not updating
- Dominant language
- C#
- Stars
- 9.8k
- Forks
- 2.4k
- Avg merge
- 1h 2m
- Merged PRs (30d)
- 56
Description
## 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
``
bind a menuitem to a string in HamburgerMenuDefault.xaml
```
```
and bind also the tabs in HamburgerMenuSample.xaml
```
```
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(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
Contributor guide
Research direction
Reproduce the issue in the demo app using HamburgerMenuDefault.xaml and HamburgerMenuSample.xaml, with the two language dictionaries and StringManager.SetCulture calls described. Compare the updating TabItem bindings with the non-updating HamburgerMenuGlyphItem and datagrid headers, then trace the relevant binding behavior. Done means the hamburger menu and datagrid headers refresh when the culture changes in both directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100