public static void Img_Tapped(object sender, Action closeCallBack)
        {
            ToolTip toolTip = (ToolTip)ToolTipService.GetToolTip((Image)sender);

            if (toolTip != null)
            {
                if (toolTip.IsOpen)
                {
                    toolTip.IsOpen = false;
                }

                toolTip.IsEnabled = false;
            }

            var flyout = Flyout.GetAttachedFlyout((FrameworkElement)sender);

            var trigger = new CloseFlyoutTrigger()
            {
                Flyout = (Flyout)flyout,

                mCloseCallback = closeCallBack
            };

            flyout.Opened += trigger.Flyout_Opened;

            flyout.Closed += trigger.Flyout_Closed;

            FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
        }
Exemple #2
0
 private void img_Tapped(object sender, TappedRoutedEventArgs e)
 {
     if (this.iContractor.PhotoRaw == null)
     {
         this.ChoosePhoto();
     }
     else
     {
         CloseFlyoutTrigger.Img_Tapped(sender, null);
     }
 }
        private void img_Tapped(object sender, TappedRoutedEventArgs e)
        {
            this.escPopUpClosingSuspended = true;

            CloseFlyoutTrigger.Img_Tapped(sender, this.EscPopUpClosingResume);
        }