Example #1
0
        private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            DataGrid dg = (DataGrid)sender;

            if (dg.SelectedItem != null)
            {
                GpuSpeedViewModel gpuSpeedVm = (GpuSpeedViewModel)dg.SelectedItem;
                gpuSpeedVm.OpenChart.Execute(null);
            }
            else
            {
                SpeedCharts.ShowWindow(null);
            }
            e.Handled = true;
        }
Example #2
0
        private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            DataGrid dg = (DataGrid)sender;
            Point    p  = e.GetPosition(dg);

            if (p.Y < dg.ColumnHeaderHeight)
            {
                return;
            }
            if (dg.SelectedItem != null)
            {
                GpuSpeedViewModel gpuSpeedVm = (GpuSpeedViewModel)dg.SelectedItem;
                gpuSpeedVm.OpenChart.Execute(null);
            }
            else
            {
                SpeedCharts.ShowWindow(null);
            }
            e.Handled = true;
        }