示例#1
0
 void inkCanvas_triggerPieMenuHandler(object sender, PieMenuEventArgs e)
 {
     DisableInkEventArgs args; 
     
     if (e.IsVisible)
     {
         args = new DisableInkEventArgs(true);
         disableInkHandler(sender, args);
         pieMenuGateSelector.Background = Brushes.Transparent;
         pieMenuGateSelector.Visibility = Visibility.Visible;
         pieMenuGateSelector.UserControlToolTipX = e.Position.X - pieMenuGateSelector.ActualWidth * 0.5; 
         pieMenuGateSelector.UserControlToolTipY = e.Position.Y - pieMenuGateSelector.ActualHeight * 0.5;
         
         //pieMenuGateSelector.UserControlToolTipX = e.Position.X;
         //pieMenuGateSelector.UserControlToolTipY = e.Position.Y;
     }
     else
     {
         args = new DisableInkEventArgs(false);
         disableInkHandler(sender, args);
         pieMenuGateSelector.Visibility = Visibility.Collapsed;                    
     }
 }
示例#2
0
 void diagramUserControl1_disableInkCanvasInkHandler(object sender, DisableInkEventArgs e)
 {
     if (e.IsDisabled)
         this.EditingMode = InkCanvasEditingMode.None;
     else
         this.EditingMode = InkCanvasEditingMode.Ink;
 }