ModernTab.Links

May 3, 2013 at 3:21 AM
Hi..
I have a ModernTab.Link in a ModernWindow and need to translation at RunTime the string in DisplayName using the ResourceDictionary
<mui:ModernTab.Links>
                <mui:Link DisplayName="Interfaccia Grafica" Source="/Settings/InterfacciaGrafica.xaml" />
                <mui:Link DisplayName="About" Source="/Content/About.xaml" />
            </mui:ModernTab.Links>
The property DisplayName is string and not accept the DynamicResource.
How can I do to change the string of the Property DisplayName at runTime for Localization my application ?

Congratulations for the work done

Thanks
Aurelio
Coordinator
May 3, 2013 at 2:15 PM
Don't create the links in XAML, create them in code instead. There you can provide your own localized strings.

Something like this works (where this.tab is the name for the mui;ModernTab instance) in the code-behind:
this.tab.Links.Add(new Link {
    DisplayName = "Interfaccia Grafica",
    Source = new Uri("/Settings/InterfacciaGrafica.xaml", UriKind.Relative)
  });
May 3, 2013 at 8:28 PM
Hi..Kozw

I use MVVM, for now i have resolve using the Message then Window is loaded..
I now test with you solution using MVVM...

Thank for the response

Aurelio