Esempio n. 1
0
        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;
     }
 }
Esempio n. 3
0
        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);
        }