Example #1
0
        private void Pushpin_Tapped(object sender, TappedRoutedEventArgs e)
        {
            Pushpin pushpin  = sender as Pushpin;
            Job     jobModel = null;

            if (pushpin != null)
            {
                jobModel = pushpin.DataContext as Job;
            }

            CapptainAgent.Instance.SendSessionEvent("Pushpin_Tapped", new Dictionary <object, object> {
                { "jobModelId", jobModel.Id }
            });

            if (jobModel == null)
            {
                return;
            }

            //Create an instance of the field engineer info controls to be shown within popup
            var userControl = new FieldEngineerInfoControl(jobModel);

            //Create a instance of the Flyout
            var tooltipPopup = new Windows.UI.Xaml.Controls.Flyout();

            tooltipPopup.Content = userControl;

            //Show the tooltip
            tooltipPopup.ShowAt(pushpin);
        }
Example #2
0
        private void OnClick(object s, RoutedEventArgs e)
        {
            var target = s as FrameworkElement;

            _flyout.ShowAt(target);
            var success = _flyout.Target == target;
            var unused  = new Windows.UI.Popups.MessageDialog(success ? "Flyout.Target updated correctly." : "Flyout.Target updated incorrectly.").ShowAsync();
        }
Example #3
0
        public Button()
        {
            InitializeVisualStates();

            Click += (s, e) => { Flyout?.ShowAt(this); };

            DefaultStyleKey = typeof(Button);
        }
        private void WindowButton_Click(object sender, RoutedEventArgs e)
        {
            Windows.UI.Xaml.Controls.Flyout flyout = new Windows.UI.Xaml.Controls.Flyout();
            flyout.Content =
                new Border()
            {
                Width      = 300,
                Height     = 300,
                Background = new SolidColorBrush(Windows.UI.Colors.Red),
            };

            flyout.ShowAt(global::Windows.UI.Xaml.Window.Current.Content as FrameworkElement);
        }
        private void ButtonButton_Click(object sender, RoutedEventArgs e)
        {
            Windows.UI.Xaml.Controls.Flyout flyout = new Windows.UI.Xaml.Controls.Flyout();
            flyout.Content =
                new Border()
            {
                Width      = 300,
                Height     = 300,
                Background = new SolidColorBrush(Windows.UI.Colors.Red),
            };

            flyout.ShowAt((Button)sender);
        }
Example #6
0
        private void OnClickFull(object s, RoutedEventArgs e)
        {
            result.Text = "";
            var target = s as FrameworkElement;

            var flyout = new Windows.UI.Xaml.Controls.Flyout()
            {
                Content = new Border
                {
                    Name       = "innerContent",
                    Height     = 100,
                    Width      = 100,
                    Background = new SolidColorBrush(Colors.Red)
                },
                Placement = Windows.UI.Xaml.Controls.Primitives.FlyoutPlacementMode.Full
            };

            flyout.ShowAt(target);
        }
Example #7
0
        private void OnClick(object s, RoutedEventArgs e)
        {
            result.Text = "";

            var flyout = new Windows.UI.Xaml.Controls.Flyout()
            {
                Content = new Border
                {
                    Name       = "innerContent",
                    Height     = 100,
                    Width      = 100,
                    Background = new SolidColorBrush(Colors.Red)
                }
            };

            var target = s as FrameworkElement;

            flyout.ShowAt(target);

            var success = flyout.Target == target;

            result.Text = success ? "success" : "failed";
        }
Example #8
0
 internal void OpenFlyout()
 {
     Flyout?.ShowAt(this);
 }
Example #9
0
        public Button()
        {
            InitializeVisualStates();

            Click += (s, e) => { Flyout?.ShowAt(this); };
        }
Example #10
0
 /// <summary>
 /// In case if Button has set Flyout property, get associated Flyout and open it next to this Button.
 /// </summary>
 private protected virtual void OpenAssociatedFlyout() => Flyout?.ShowAt(this);
Example #11
0
 /// <summary>
 /// In case if Button has set Flyout property, get associated Flyout and open it next to this Button.
 /// </summary>
 private void OpenAssociatedFlyout() => Flyout?.ShowAt(this);