Exemple #1
0
        private void ViewAttachments_OnClick(object sender, RoutedEventArgs e)
        {
            var f = new Callisto.Controls.Flyout()
            {
                Placement       = PlacementMode.Top,
                PlacementTarget = (UIElement)sender
            };

            Menu m = new Menu();

            foreach (var attachment in ViewModel.Attachments)
            {
                var mi = new MenuItem()
                {
                    Text = attachment.ProposedFilename,
                    Tag  = attachment
                };

                mi.Tapped += Attachment_OnTapped;

                m.Items.Add(mi);
            }

            f.Content = m;
            WebViewFlyoutFixes.ShowFlyout(f, this);
        }
Exemple #2
0
        void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            var c = new Color()
            {
                R = 46,
                G = 46,
                B = 46
            };

            // Add an About command
            var about = new SettingsCommand("about",
                                            "Über",
                                            (handler) =>
            {
                var aboutFlyout     = new Callisto.Controls.SettingsFlyout();
                aboutFlyout.Content = new AboutControl();

                aboutFlyout.ContentBackgroundBrush = new SolidColorBrush(c);
                aboutFlyout.HeaderText             = "Über";

                WebViewFlyoutFixes.ShowSettingsFlyout(aboutFlyout);
            });

            args.Request.ApplicationCommands.Add(about);

            // Add a Preferences command
            var preferences = new SettingsCommand("preferences", "Einstellungen", (handler) =>
            {
                var settings     = new Callisto.Controls.SettingsFlyout();
                settings.Content = new PreferencesUserControl();

                settings.ContentBackgroundBrush = new SolidColorBrush(c);
                settings.HeaderText             = "Einstellungen";

                WebViewFlyoutFixes.ShowSettingsFlyout(settings);
            });

            args.Request.ApplicationCommands.Add(preferences);
        }
Exemple #3
0
 public void OnFlyoutClose()
 {
     WebViewFlyoutFixes.FlyoutClose(webViewRect, webView);
 }
Exemple #4
0
 public async Task OnFlyoutOpen()
 {
     await WebViewFlyoutFixes.FlyoutOpenAsync(webViewRect, webView);
 }