コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: mbin/Win81App
        private void SetCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            SettingsCommand cmd = new SettingsCommand(
                 "sample",
                 "Feedback",
                 (x) =>
                 {
                     // create a new instance of the flyout
                     SettingsFlyout settings = new SettingsFlyout();
                     settings.Title = "Provide Feedback";
                     BitmapImage bitmap = new BitmapImage(new Uri("ms-appx:///Assets/SmallLogo.png"));
                     settings.IconSource = bitmap;

                     // set the content for the flyout
                     var settingsContent = new FeedbackContent();
                     settingsContent.FeedbackSent += (s, e) =>
                     {
                         settings.Hide();
                     };

                     settings.HorizontalContentAlignment = Windows.UI.Xaml.HorizontalAlignment.Stretch;
                     settings.Content = settingsContent;

                     // open it
                     settings.Show();
                 });

            args.Request.ApplicationCommands.Add(cmd);
        }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: ckc/WinApp
        private void SetCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            SettingsCommand cmd = new SettingsCommand(
                "sample",
                "Feedback",
                (x) =>
            {
                // create a new instance of the flyout
                SettingsFlyout settings = new SettingsFlyout();
                settings.Title          = "Provide Feedback";
                BitmapImage bitmap      = new BitmapImage(new Uri("ms-appx:///Assets/SmallLogo.png"));
                settings.IconSource     = bitmap;

                // set the content for the flyout
                var settingsContent           = new FeedbackContent();
                settingsContent.FeedbackSent += (s, e) =>
                {
                    settings.Hide();
                };

                settings.HorizontalContentAlignment = Windows.UI.Xaml.HorizontalAlignment.Stretch;
                settings.Content = settingsContent;

                // open it
                settings.Show();
            });

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