Hey guys, i run in some serious problem on my project.
in my app.xaml, i have ResourceDictionary
which contain ResourceDictionary.MergedDictionaries. in the MergerDictionaries, i have bounch of ResourceDictionary reference to the source, like that:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/EW;component/Resources/Dictionary/TextBlockStyle.xaml"/>
<ResourceDictionary Source="/EW;component/Resources/Dictionary/RoundConrner.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Now, i added an ObjectDataProvider to the app.xaml and this odp needs to come with a key:
<ObjectDataProvider x:Key="odpSettings" ObjectType="{x:Type src:UserPreference}"/>
The problem is that when i put the odp with key, i have to set a key also to the ResourceDictionary, like that:
<ResourceDictionary x:Key="RD">
when i'm trying to load a ResourceDictionary from aonther window, i get an error saying the resource could not been found:
TextBox x:Name="txtEmail" Margin="99,170,105,0" TextWrapping="Wrap"
HorizontalContentAlignment="Center" Foreground="#FF4C4949"
FontWeight="Thin"
Text="email:" GotFocus="txtEmail_GotFocus" LostFocus="txtEmail_LostFocus"
Style="{StaticResource TextBlockStyle}" Width="207" FontSize="12"
any advice on how to call the resourceDictionary with the key?
What I have tried:
i tried setting the ObjectDataProvider inside the resourceDictionary but then i get a message saying the ODP couldnt be found. please help me!!!!