protected virtual void ClickOnTheHeader() { DesignerCanvas designerCanvas = VisualHelper.GetVisualParent <DesignerCanvas>(this); if (designerCanvas != null) { designerCanvas.Container.Selection = this.DataContext; } }
private void ListBox_PreviewMouseDown(object sender, MouseButtonEventArgs e) { if (e.ClickCount == 2) { if (this.DataContext is ThumbnailViewModel vm) { var elem = VisualHelper.GetVisualParent <FrameworkElement>(e.OriginalSource as DependencyObject); } e.Handled = true; } }
private void RadGridViewEx_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (!(e.OriginalSource is FrameworkElement elem)) { return; } var cell = VisualHelper.GetVisualParent <GridViewCell>(elem); if (cell == null) { return; } (this.DataContext as IInteractionGridViewModel)?.NotifyDoubleClickOnRow(cell.DataContext); }