I have defined a custom resourceDictionary and I have added it to the app.xaml resources
I have a style with key "MyStyle" in the Theme.xaml. How can I access the MyStyle style from the MainPage.xaml?
I have defined a custom resourceDictionary and I have added it to the app.xaml resources
I have a style with key "MyStyle" in the Theme.xaml. How can I access the MyStyle style from the MainPage.xaml?
Have you tried this in your App.xaml:-
<Application.Resources>
<ResourceDictionary>
<!-- You other resources here -->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
...
Now you should be able to {StaticResource MyStyle}
from within MainPage.xaml.