I'm creating a XamarinFroms solution and i want to implement Fluent Design or pats of it in my UWP app. As you may know, Most of Fluent Design building blocks are ThemeResources. so i tried to do:
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush"))
{
var brush = Windows.UI.Xaml.Application.Current.Resources["SystemControlAltHighAcrylicWindowBrush"] as AcrylicBrush;
var tint = brush.TintColor;
var opacity = brush.TintOpacity;
var fallbackColor = brush.FallbackColor;
var source = brush.BackgroundSource;
}
but unfortionalty i get a
System.Exception: 'Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))' on the brush creating line of code.
I won't be able to access any predefined Brushes or i can never implement reveal styles if i'm not able to retrieve those theme resources in code in my UWP project
