我想获取 Datagrid Cell 的事件触发器。我的意思是说我想写这样的东西
**<EventTrigger EventName="MouseEnter">**
然后从 XAML 调用函数 this:
void Cell_MouseEnter(对象发送者,MouseEventArgs e)
我该怎么做:
我在 XAML 中有这个
<ctrls:RhinoDataGrid x:Name="dataGrid" Grid.Row="1" Margin="5" ItemsSource="{Binding Model.CurrentDataTable}"
Style="{StaticResource RhinoDataGridBaseStyle}" IsReadOnly="{Binding Model.IsLinkFile}"
SelectedValue="{Binding Model.CurrentDataRow}" SelectedValuePath="Row" SetAutomappingOnOff="{Binding IsAutoMap, Mode=TwoWay}" >
</ctrls:RhinoDataGrid>
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="BorderBrush" Value="Transparent"></Setter>
<Setter Property="BorderThickness" Value="2"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource ActiveItemBrush}"></Setter>
<Setter Property="BorderThickness" Value="2"></Setter>
</Trigger>
</Style.Triggers>
请帮忙
谢谢迪