DataGridTableStyle.SelectionForeColorChanged 事件

定义

SelectionForeColor 值更改时发生。

public:
 event EventHandler ^ SelectionForeColorChanged;
public event EventHandler SelectionForeColorChanged;
member this.SelectionForeColorChanged : EventHandler 
Public Custom Event SelectionForeColorChanged As EventHandler 

事件类型

示例

下面的代码示例演示了此成员的用法。 在此示例中,事件处理程序报告事件的发生情况 SelectionForeColorChanged 。 此报表可帮助你了解事件发生的时间,并可以帮助你进行调试。 若要报告多个事件或频繁发生的事件,请考虑将 MessageBox.Show 替换为 Console.WriteLine 或将消息追加到多行 TextBox

若要运行示例代码,请将其粘贴到包含名为 DataGridTableStyle1的 类型的DataGridTableStyle实例的项目中。 然后,确保事件处理程序与 SelectionForeColorChanged 事件相关联。

private void DataGridTableStyle1_SelectionForeColorChanged(Object sender, EventArgs e) {

   MessageBox.Show("You are in the DataGridTableStyle.SelectionForeColorChanged event.");
}
Private Sub DataGridTableStyle1_SelectionForeColorChanged(sender as Object, e as EventArgs) _ 
     Handles DataGridTableStyle1.SelectionForeColorChanged

   MessageBox.Show("You are in the DataGridTableStyle.SelectionForeColorChanged event.")

End Sub

适用于

另请参阅