I'm curious is there more convenient way to use themes in Xamarin forms. Known way is add Colors into ResourceDictionary in App.xaml:
<Color x:Key="BackgroundColorDark">#111111</Color>
<Color x:Key="BackgroundColorLight">#ffffff</Color>
and then specify it on element like this:
<Button BackgroundColor="{AppThemeBinding Light={StaticResource DarkPageBackgroundColor},
Dark={StaticResource LightPageBackgroundColor}}" ... >
So my question is there possibility to do it in different way? I have reaaly lots of buttons for example, and I don't want to specify everywhere for each of those buttons that it has to use this color for light theme and that for dark. I want to specify it like: Hey Button, your background color is "ButtonBackgroundColor" and its value depends on current theme, which itself is set in two different ResourceDictionaries, like this:
<ResourceDictionary x:Name="Dark">
<Color x:Key="ButtonBackgroundColor">#000000</Color>
</ResourceDictionary>
<ResourceDictionary x:Name="White">
<Color x:Key="ButtonBackgroundColor">#ffffff</Color>
</ResourceDictionary>