private void root_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (Parent.EditEnabled) { // Get Point relative to this Control (relative position of the cursor on the control) controlPoint = e.GetPosition(this); var element = sender as FrameworkElement; element.CaptureMouse(); StartDrag(); e.Handled = true; } else { ViewDetails?.Invoke(this); } }
protected virtual void OnViewDetails(ViewDetailsEventArgs e) { ViewDetails?.Invoke(this, e); }
private void MenuItem_ViewDetails_Click(object sender, RoutedEventArgs e) { ViewDetails?.Invoke(this); }