我有一个分为3行和3列的WPF网格,我无法找到一种方法来获取鼠标点击网上的行和列号,哦,如果有可能它会更好我的程序,这部分将在代码而不是XAML,这是我的简单网格:
<Grid Name="GridCtrl" ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition Height="3*" />
<RowDefinition Height="3*" />
<RowDefinition Height="3*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
</Grid>
Run Code Online (Sandbox Code Playgroud)