コード例 #1
0
        public ApplicationHostPage()
        {
            this.InitializeComponent();
            this.Loaded += ApplicationHostPage_Loaded;
            Host         = this;
            _geolocator  = new Geolocator();
            _geolocator.StatusChanged   += _geolocator_StatusChanged;
            _geolocator.PositionChanged += _geolocator_PositionChanged;
            GeofenceMonitor.Current.GeofenceStateChanged += Current_GeofenceStateChanged;
            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;

            //set the application titlebar look
            var current_view   = ApplicationView.GetForCurrentView();
            var titlebar_color = Color.FromArgb(0xFF, 0x6A, 0x6A, 0x6A);

            current_view.TitleBar.BackgroundColor               = titlebar_color; //Colors.DarkGray;
            current_view.TitleBar.InactiveBackgroundColor       = titlebar_color;
            current_view.TitleBar.ButtonBackgroundColor         = titlebar_color;
            current_view.TitleBar.ButtonInactiveBackgroundColor = titlebar_color;
            current_view.TitleBar.InactiveBackgroundColor       = titlebar_color;
            current_view.TitleBar.ForegroundColor               = Colors.White;
            current_view.TitleBar.InactiveForegroundColor       = Colors.White;
            current_view.TitleBar.ButtonForegroundColor         = Colors.White;
            current_view.TitleBar.ButtonInactiveForegroundColor = Colors.White;

            ApplicationView.PreferredLaunchWindowingMode = windowmode.Auto;

            CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
            Window.Current.SetTitleBar(rect_titlebar);
        }
コード例 #2
0
 public ApplicationHostPage()
 {
     this.InitializeComponent();
     this.Loaded += ApplicationHostPage_Loaded;
     Host         = this;
     _geolocator  = new Geolocator();
     _geolocator.StatusChanged   += _geolocator_StatusChanged;
     _geolocator.PositionChanged += _geolocator_PositionChanged;
     GeofenceMonitor.Current.GeofenceStateChanged += Current_GeofenceStateChanged;
     SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
     SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
 }