這是一個示例代碼: public class GridViewWindowViewModel : INotifyPropertyChanged
{
public GridViewWindowViewModel()
{
Tables = new ObservableCollection<string> { "Person", "Car" };
使用Winforms'DataGridView,可以使用HitTest來確定鼠標向下(和其他事件)的列和行索引。 Dim hti As DataGridView.HitTestInfo = sender.HitTest(e.X, e.Y)
是否有類似WPF的DataGrid?我需要獲取MouseLeftButtonDown事件的行和列索引。
嗯,我有一些像這樣的數據對象的數據類: private ObservableCollection<bool> check = new ObservableCollection<bool>();
public ObservableCollection<bool> Check
{
get { return check; }
set
{