コード例 #1
0
 public SchedulerSelectionChangedEventArgs(SchedulerItem selectedItem)
 {
     SelectedItem = selectedItem;
 }
コード例 #2
0
 void SchedulerItemsControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     var hitTest = VisualTreeHelper.HitTest(this, e.GetPosition(this));
     var hitTestResult =
         VisualTreeHelper.GetParent(VisualTreeHelper.GetParent(VisualTreeHelper.GetParent(hitTest.VisualHit))) as SchedulerItem;
     if (hitTestResult != null)
     {
         SelectedItem = hitTestResult;
         startDragPosition = e.GetPosition(null);
     }
 }
コード例 #3
0
 private void OnSelectionChanged(SchedulerItem selectedItem)
 {
     var handler = SelectionChanged;
     if (handler != null)
     {
         handler(this, new SchedulerSelectionChangedEventArgs(selectedItem));
     }
 }
コード例 #4
0
 void SchedulerItemsControl_MouseUp(object sender, MouseButtonEventArgs e)
 {
     var hitTest = VisualTreeHelper.HitTest(this, e.GetPosition(this));
     var hitTestResult = VisualTreeHelper.GetParent(VisualTreeHelper.GetParent(VisualTreeHelper.GetParent(hitTest.VisualHit))) as SchedulerItem;
     if (hitTestResult != null)
     {
         SelectedItem = hitTestResult;
     }
 }
コード例 #5
0
 protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
 {
     base.OnMouseLeftButtonDown(e);
     var hitTest = VisualTreeHelper.HitTest(this, e.GetPosition(this));
     var hitTestResult =
         VisualTreeHelper.GetParent(VisualTreeHelper.GetParent(VisualTreeHelper.GetParent(hitTest.VisualHit))) as SchedulerItem;
     if (hitTestResult != null)
     {
         SelectedItem = hitTestResult;
         startDragPosition = e.GetPosition(null);
     }
 }