示例#1
0
 public void onSourceUpDown(object sender, RoutedEventArgs e)
 {
     try
     {
         _srcToReposition = ((SourceUC)e.OriginalSource).DataContext as Source;
         srcPopup.IsOpen  = true;
         HwndSource hwndSource =
             (HwndSource)PresentationSource.FromVisual((Visual)VisualTreeHelper.GetParent(srcPopup.Child));
         hwndSource.EnableSurfaceInput();
     }
     catch (Exception)
     {
         _srcToReposition = null;
     }
 }
示例#2
0
 public void onAttachmentUpDown(object sender, RoutedEventArgs e)
 {
     try
     {
         _attachmentToReposition = ((FrameworkElement)e.OriginalSource).DataContext as Attachment;
         medPopup.IsOpen         = true;
         HwndSource hwndSource =
             (HwndSource)PresentationSource.FromVisual((Visual)VisualTreeHelper.GetParent(medPopup.Child));
         hwndSource.EnableSurfaceInput();
     }
     catch (Exception)
     {
         _attachmentToReposition = null;
     }
 }