'宣言 Public Property HotTrackHeaderAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase HotTrackHeaderAppearance {get; set;}
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles ultraGrid1.InitializeLayout ' This will apply to the cell that's under the mouse. e.Layout.Override.HotTrackCellAppearance.BackColor = Color.Blue ' This will apply to all the cells of the row that's under the mouse. e.Layout.Override.HotTrackRowCellAppearance.BackColor = Color.Yellow ' This will apply to the header that's under the mouse. e.Layout.Override.HotTrackHeaderAppearance.BackColor = Color.Blue ' This will apply to the row that's under the mouse. e.Layout.Override.HotTrackRowAppearance.ForeColor = Color.DarkRed ' This will apply to the row selector of the row that's under the mouse. e.Layout.Override.HotTrackRowSelectorAppearance.ForeColor = Color.Green End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { // This will apply to the cell that's under the mouse. e.Layout.Override.HotTrackCellAppearance.BackColor = Color.Blue; // This will apply to all the cells of the row that's under the mouse. e.Layout.Override.HotTrackRowCellAppearance.BackColor = Color.Yellow; // This will apply to the header that's under the mouse. e.Layout.Override.HotTrackHeaderAppearance.BackColor = Color.Blue; // This will apply to the row that's under the mouse. e.Layout.Override.HotTrackRowAppearance.ForeColor = Color.DarkRed; // This will apply to the row selector of the row that's under the mouse. e.Layout.Override.HotTrackRowSelectorAppearance.ForeColor = Color.Green; }