Hi all,
I would like to structure my XAML code into different files related to different Views. So I coded the following:
<Window.Resources>
<ResourceDictionary>
<!-- Create instance(s) of the ViewModel(s) and
related objects.
-->
<m:ViewModelBase x:Key="ViewModelBase"/>
<m:GatherFileSet x:Key="GatherFileSet"/>
<m:LoadFileSet x:Key="LoadFileSet"/>
<m:ExecuteTheJob x:Key="ExecuteTheJob"/>
<m:SaveFileSet x:Key="SaveFileSet"/>
<m:ChangeSettings x:Key="ChangeSettings"/>
<m:StringBuilderConverter x:Key="StringToBuilder"/>
<m:EnumHasFlagConverter x:Key="HasFlag"/>
<m:EnumEqualityConverter x:Key="EnumEqualTrue"/>
<m:EnumEqualityConverter x:Key="EnumEqualFalse" Negation="True" />
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary
<ResourceDictionary Source="pack://application:,,,/10 Classes/10 Views/10 Styles/GeneralStyles.xaml" />
<ResourceDictionary Source="pack://application:,,,/10 Classes/10 Views/ExecuteTheJobStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
Unfortunately all references with StaticResource or DynamicResource coded in the RD "ExecuteTheJobStyles.xaml" against objects outside of the file don't work against the Window.Resources nor against the GeneralStyles.xaml-file. References from Window.Resources to objects within the "external" xaml-files do work.
Works as designed or is my code wrong?
TIA.
JD

