public void SetBarAndStyle() { if (DeviceInfoManager.GetOsVersion() > 15063) { if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.XamlCompositionBrushBase")) { Windows.UI.Xaml.Media.AcrylicBrush myBrush = new Windows.UI.Xaml.Media.AcrylicBrush(); myBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop; myBrush.FallbackColor = Colors.Transparent; myBrush.TintColor = Color.FromArgb(255, 15, 15, 15); myBrush.TintOpacity = 0.3; SplitViewPane.Background = myBrush; BarGrid.Background = myBrush; Style buttonReveal = (Style)Application.Current.Resources["ButtonRevealStyle"]; Style itemReveal = (Style)Application.Current.Resources["NavMenuItemRevealStyle"]; PaneOpenButton.Style = buttonReveal; NavMenuPrimaryListView.ItemContainerStyle = itemReveal; NavMenuSecondaryListView.ItemContainerStyle = itemReveal; } } CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true; ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; titleBar.ButtonBackgroundColor = Colors.Transparent; titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; titleBar.ButtonForegroundColor = Colors.White; titleBar.ButtonHoverBackgroundColor = Colors.Gray; }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (DeviceInfoManager.GetOsVersion() > 15063) { Windows.UI.Xaml.Media.AcrylicBrush myBrush = new Windows.UI.Xaml.Media.AcrylicBrush(); myBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop; myBrush.FallbackColor = Colors.Transparent; myBrush.TintColor = Color.FromArgb(255, 15, 15, 15); myBrush.TintOpacity = 0.3; TitleGrid.Background = myBrush; CreatureGrid.Background = myBrush; //Style style = (Style)Application.Current.Resources["GridViewItemRevealStyle"]; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (DeviceInfoManager.GetOsVersion() > 15063) { Windows.UI.Xaml.Media.AcrylicBrush myBrush = new Windows.UI.Xaml.Media.AcrylicBrush(); myBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop; myBrush.FallbackColor = Colors.Transparent; myBrush.TintColor = Color.FromArgb(255, 15, 15, 15); myBrush.TintOpacity = 0.3; AboutGrid.Background = myBrush; Color brush = (Color)Application.Current.Resources["SystemAccentColor"]; Windows.UI.Xaml.Media.AcrylicBrush appInfoBrush = new Windows.UI.Xaml.Media.AcrylicBrush(); appInfoBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop; appInfoBrush.FallbackColor = Colors.Transparent; appInfoBrush.TintColor = brush; appInfoBrush.TintOpacity = 0.6; AppInfoGrid.Background = appInfoBrush; TitleGrid.Background = appInfoBrush; } }