示例#1
0
 public static void SetTitleBar(UIElement titleBar)
 {
     if (DeviceTypeHelper.GetDeviceType() != DeviceTypeEnum.Tablet)
     {
         return;
     }
     if (Numbers.OSVersion <= 10586)
     {
         return;
     }
     Window.Current.SetTitleBar(titleBar);
 }
示例#2
0
        public static void SetAppView(bool extend)
        {
            if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                StatusBar.GetForCurrentView().HideAsync();
            }

            if (DeviceTypeHelper.GetDeviceType() == DeviceTypeEnum.Xbox)
            {
                ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
            }

            if (DeviceTypeHelper.GetDeviceType() != DeviceTypeEnum.Tablet)
            {
                return;
            }
            if (Numbers.OSVersion <= 10586)
            {
                return;
            }

            var coreAppViewTitleBar = CoreApplication.GetCurrentView().TitleBar;

            if (!Locator.SettingsVM.MediaCenterMode)
            {
                coreAppViewTitleBar.ExtendViewIntoTitleBar = extend;
            }
            else
            {
                coreAppViewTitleBar.ExtendViewIntoTitleBar = false;
            }

            var appView  = ApplicationView.GetForCurrentView();
            var titleBar = appView.TitleBar;

            titleBar.BackgroundColor               = Colors.Transparent;
            titleBar.ButtonForegroundColor         = Colors.DimGray;
            titleBar.ButtonBackgroundColor         = Colors.Transparent;
            titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
        }
 public bool IsCurrentPlatform()
 {
     return(DeviceType == DeviceTypeHelper.GetDeviceType());
 }