コード例 #1
0
ファイル: Expander.cs プロジェクト: ElinamLLC/SharpDeveloper
        protected virtual void ClickOnTheHeader()
        {
            DesignerCanvas designerCanvas = VisualHelper.GetVisualParent <DesignerCanvas>(this);

            if (designerCanvas != null)
            {
                designerCanvas.Container.Selection = this.DataContext;
            }
        }
コード例 #2
0
 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;
     }
 }
コード例 #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);
        }