I have a Windows 8 Metro application created from the Grid Application template. I need to localize the buttons in the AppBar. Normaly I use x:Uid and .resw for localization but this does not work for the navigation buttons in AppBar.
For example, for the Home button I need to localize the "Home" text. The "Home" text is defined in StandardStyles.xaml as follows:
<Setter Property="AutomationProperties.Name" Value="Home"/>
I tried defining HomeButton.AutomationProperties.Name in resw but I get
Unable to resolve property 'AutomationProperties.Name' while processing properties for Uid
Can anyone help?
take a look at http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965329.aspx where it shows how to use the right RESW syntax for an attached property like this. So if you are using the button styles you could do something like this:
<Button Style="{StaticResource HomeAppBarButtonStyle}" x:Uid="HomeButton" />
And then in your RESW you'd have:
HomeButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name
as your key value.
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With