Esempio n. 1
0
        private void OnSettingsCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            SettingsCommand cmd = new SettingsCommand(
                "about",
                "About",
                (x) =>
            {
                _settingsPopup                       = new Popup();
                _settingsPopup.Closed               += OnSettingsPopupClosed;
                Window.Current.Activated            += OnWindowActivated;
                _settingsPopup.IsLightDismissEnabled = true;
                _settingsPopup.Width                 = 346;
                _settingsPopup.Height                = Window.Current.Bounds.Height;

                AboutPanel mypane = new AboutPanel();
                mypane.Width      = _settingsPopup.Width;
                mypane.Height     = Window.Current.Bounds.Height;

                _settingsPopup.Child = mypane;
                _settingsPopup.SetValue(Canvas.LeftProperty, Window.Current.Bounds.Width - _settingsPopup.Width);
                _settingsPopup.SetValue(Canvas.TopProperty, 0);
                _settingsPopup.IsOpen = true;
            });

            args.Request.ApplicationCommands.Add(cmd);
        }
Esempio n. 2
0
        private void OnSettingsCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            SettingsCommand cmd = new SettingsCommand(
                "about",
                "About",
                (x) =>
                {
                    _settingsPopup = new Popup();
                    _settingsPopup.Closed += OnSettingsPopupClosed;
                    Window.Current.Activated += OnWindowActivated;
                    _settingsPopup.IsLightDismissEnabled = true;
                    _settingsPopup.Width = 346;
                    _settingsPopup.Height = Window.Current.Bounds.Height;

                    AboutPanel mypane = new AboutPanel();
                    mypane.Width = _settingsPopup.Width;
                    mypane.Height = Window.Current.Bounds.Height;

                    _settingsPopup.Child = mypane;
                    _settingsPopup.SetValue(Canvas.LeftProperty, Window.Current.Bounds.Width - _settingsPopup.Width);
                    _settingsPopup.SetValue(Canvas.TopProperty, 0);
                    _settingsPopup.IsOpen = true;
                });

            args.Request.ApplicationCommands.Add(cmd);
        }