Home Forums WinForms controls Xceed Grid for WinForms Vista style Reply To: Vista style

User (Old forums)
Member
Post count: 23064

Hi Andre,

here’s the code

Public

Sub VistaStyle()

Dim activeSelectionGradientMap As New GradientMap()

Dim inactiveSelectionGradientMap As New GradientMap()

Dim columnManagerCellHotVisualStyle As New StatelessVisualGridElementStyle()

Dim columnManagerCellHotGradientMap As New GradientMap()

Dim columnManagerCellGradientMap As New GradientMap()

‘dim

Dim rowSelectorGradientMap As GradientMap = CType(columnManagerCellGradientMap.Clone(), GradientMap)

Dim rowSelectorHotVisualStyle As New StatelessVisualGridElementStyle()

Dim rowSelectorHotGradientMap As GradientMap = CType(columnManagerCellHotGradientMap.Clone(), GradientMap)

Dim hotGradientMap As New GradientMap()

Dim hotVisualStyle As New StatelessVisualGridElementStyle()

‘ Dim detailGridTemplate_Type As New DetailGrid

Try

Me.GridControl1.OverrideUIStyle = True

 

activeSelectionGradientMap.GradientStops.Add(

New GradientStop(0, Color.FromArgb(241, 248, 253)))

activeSelectionGradientMap.GradientStops.Add(

New GradientStop(1, Color.FromArgb(213, 239, 252)))

inactiveSelectionGradientMap.GradientStops.Add(

New GradientStop(0, Color.FromArgb(248, 248, 248)))

inactiveSelectionGradientMap.GradientStops.Add(

New GradientStop(1, Color.FromArgb(229, 229, 229)))

columnManagerCellHotGradientMap.GradientStops.Add(

New GradientStop(0, Color.FromArgb(170, 227, 247, 255)))

columnManagerCellHotGradientMap.GradientStops.Add(

New GradientStop(0.4375, Color.FromArgb(170, 227, 247, 255)))

columnManagerCellHotGradientMap.GradientStops.Add(

New GradientStop(0.4375, Color.FromArgb(170, 187, 235, 254)))

columnManagerCellHotGradientMap.GradientStops.Add(

New GradientStop(1, Color.FromArgb(170, 187, 235, 254)))

columnManagerCellHotVisualStyle.GradientMap = columnManagerCellHotGradientMap

columnManagerCellHotVisualStyle.OverrideUIStyle =

True

columnManagerCellGradientMap.GradientStops.Add(

New GradientStop(0, Color.White))

columnManagerCellGradientMap.GradientStops.Add(

New GradientStop(0.4375, Color.White))

columnManagerCellGradientMap.GradientStops.Add(

New GradientStop(0.4375, Color.FromArgb(255, 245, 246, 248)))

columnManagerCellGradientMap.GradientStops.Add(

New GradientStop(1, Color.FromArgb(255, 245, 246, 248)))

rowSelectorGradientMap.GradientMode = Xceed.UI.GradientMode.Horizontal

rowSelectorHotGradientMap.GradientMode = Xceed.UI.GradientMode.Horizontal

rowSelectorHotVisualStyle.GradientMap = rowSelectorHotGradientMap

rowSelectorHotVisualStyle.OverrideUIStyle =

True

hotGradientMap.GradientStops.Add(

New GradientStop(0, Color.FromArgb(120, Color.Orange)))

hotGradientMap.GradientStops.Add(

New GradientStop(1, Color.FromArgb(220, Color.White)))

hotVisualStyle.BackColor = Color.Transparent

hotVisualStyle.GradientMap = hotGradientMap

dataRowTemplate1.HotVisualStyle = hotVisualStyle

dataRowTemplate1.RowSelector.GradientMap = rowSelectorGradientMap

dataRowTemplate1.RowSelector.HotVisualStyle = rowSelectorHotVisualStyle

Catch ex As Exception

End Try

End Sub

Imported from legacy forums. Posted by yeswanth (had 227 views)