tags:

views:

983

answers:

1

Hi,

I have a Global string in my App.xaml I want to uses in a UserControl xaml how do I reference it?

<Application.Resources>
   <sys:String x:Key="Assembly">Zpg</sys:String>
</Application.Resources>

I also have a valiable in the UserControl Resources do I use this in a simila way in the xaml?

<UserControl.Resources>
    <sys:String x:Key="Dictionary">Test</sys:String>
</UserControl.Resources>

I hope that makes some sense, basically I have the following I want to replace with reference to the above variables as I will use them a lot.

Text="{LocText Key=MyString, Dict=Test, Assembly=Zpg}"

Thanks,

James

+2  A: 
Text="{LocText Key=MyString, Dict={StaticResource Dictionary}, Assembly={StaticResource Assembly}}"

HTH, Kent

Kent Boogaart