/// <summary>
        /// This is the click handler for the 'showDefaults' button.  Shows a SettingsFlyout.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showDefaults_Click(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;
            if (b != null)
            {
                rootPage.NotifyUser("You opened the 'Defaults' SettingsFlyout.", NotifyType.StatusMessage);
                SettingsFlyout1 sf = new SettingsFlyout1();

                // Note the use of ShowIndependent() here versus Show() in Scenario 2.
                sf.ShowIndependent();
            }
        }
        /// <summary>
        /// Handler for the CommandsRequested event. Add custom SettingsCommands here.
        /// </summary>
        /// <param name="e">Event data that includes a vector of commands (ApplicationCommands)</param>
        void onCommandsRequested(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs e)
        {
            SettingsCommand defaultsCommand = new SettingsCommand("defaults", "Defaults",
                (handler) =>
                {
                    // SettingsFlyout1 is defined in "SettingsFlyout1.xaml"
                    rootPage.NotifyUser("You opened the 'Defaults' SettingsFlyout.", NotifyType.StatusMessage);
                    SettingsFlyout1 sf = new SettingsFlyout1();
                    sf.Show();
                });
            e.Request.ApplicationCommands.Add(defaultsCommand);

        }
Ejemplo n.º 3
0
        /// <summary>
        /// Handler for the CommandsRequested event. Add custom SettingsCommands here.
        /// </summary>
        /// <param name="e">Event data that includes a vector of commands (ApplicationCommands)</param>
        void onCommandsRequested(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs e)
        {
            SettingsCommand defaultsCommand = new SettingsCommand("defaults", "Defaults",
                                                                  (handler) =>
            {
                // SettingsFlyout1 is defined in "SettingsFlyout1.xaml"
                rootPage.NotifyUser("You opened the 'Defaults' SettingsFlyout.", NotifyType.StatusMessage);
                SettingsFlyout1 sf = new SettingsFlyout1();
                sf.Show();
            });

            e.Request.ApplicationCommands.Add(defaultsCommand);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// This is the click handler for the 'showDefaults' button.  Shows a SettingsFlyout.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showDefaults_Click(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;

            if (b != null)
            {
                rootPage.NotifyUser("You opened the 'Defaults' SettingsFlyout.", NotifyType.StatusMessage);
                SettingsFlyout1 sf = new SettingsFlyout1();

                // Note the use of ShowIndependent() here versus Show() in Scenario 2.
                sf.ShowIndependent();
            }
        }