Q:

Data Binding between 2 XAML files

I am creating a WP8 app using C#.
I have 2 XAML files representing 2 pages : MainPage and InfoPage
I want a header title for both of the page to be the same.
So the header title for MainPage is set to "MyApp"
Now, is it possible to bind the header title for InfoPage to the one in MainPage? So that both XAML has "MyApp" as the header title.
If this is not possible, why?
Thanks

A:

According to your comment to use LocalizedResources via xaml you have add Binding Path and show which class to use, for example this will work
In App.xaml add key which points to your class LocalizedStrings:
<Application.Resources xmlns:my="clr-namespace:NameSpaceWhereLocalizedStrings">
    <my:LocalizedStrings x:Key="Localized"/>
</Application.Resources>

clr-namespace: - is a namespace where you have your LocalizedStrings (probably your main namespace). Then you can use in any other xaml file your LocalizedResources:
<TextBlock Text="{Binding LocalizedResources.appName, Source={StaticResource Localized}}"/>

appName - is your variable in AppResources.resx (of course check if it's public). LocalizedResources is a class which you probably have as a default in LocalizedStrings.cs:
public class LocalizedStrings
{
  private static AppResources _localizedResources = new AppResources();
  public AppResources LocalizedResources { get { return _localizedResources; } }
}

Localized Resources are very usefull, because with them you can localize your App, so that users can have your Resources in different languages MSDN. There are also much more blogs and sites where you can find more.

