mastiSoft
asked on
problem with resource dictionary
if I write like this in App.xaml
<Application.Resources>
<Style x:Key="CustomWindow" TargetType="{x:Type Window}">
</Style>
<ResourceDictionary x:Key="lng" Source="lang/eng_lang.xaml ">
<ResourceDictionary.Merged Dictionari es>
<ResourceDictionary Source="lang/eng_lang.xaml "/>
</ResourceDictionary.Merge dDictionar ies>
</ResourceDictionary>
</Application.Resources>
then when I use <Label Content="{DynamicResource SelUn}" the SelUn cannot be resolved.
If I remove
<Style x:Key="CustomWindow" TargetType="{x:Type Window}">
</Style>
and it will be only :
<Application.Resources>
<ResourceDictionary Source="lang/eng_lang.xaml ">
<ResourceDictionary.Merged Dictionari es>
<ResourceDictionary Source="lang/eng_lang.xaml "/>
</ResourceDictionary.Merge dDictionar ies>
</ResourceDictionary>
</Application.Resources>
<Label Content="{DynamicResource SelUn}" shows the correct string but I need use others styles in app.xml
How can I point into my code for <Label Content= the x:Key for the resource dictionary? I think this is the problem.
<Application.Resources>
<Style x:Key="CustomWindow" TargetType="{x:Type Window}">
</Style>
<ResourceDictionary x:Key="lng" Source="lang/eng_lang.xaml
<ResourceDictionary.Merged
<ResourceDictionary Source="lang/eng_lang.xaml
</ResourceDictionary.Merge
</ResourceDictionary>
</Application.Resources>
then when I use <Label Content="{DynamicResource SelUn}" the SelUn cannot be resolved.
If I remove
<Style x:Key="CustomWindow" TargetType="{x:Type Window}">
</Style>
and it will be only :
<Application.Resources>
<ResourceDictionary Source="lang/eng_lang.xaml
<ResourceDictionary.Merged
<ResourceDictionary Source="lang/eng_lang.xaml
</ResourceDictionary.Merge
</ResourceDictionary>
</Application.Resources>
<Label Content="{DynamicResource SelUn}" shows the correct string but I need use others styles in app.xml
How can I point into my code for <Label Content= the x:Key for the resource dictionary? I think this is the problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi. I understand the point, thank you .
ASKER
Thank you very much.
ASKER
2.PNG