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

User (Old forums)
Member
Post count: 23064

I found a code sample to add a stylesheet programmatically and it is really nice. However, the basic background image for the header row does not work with images!….

Here is what I’m using:

Public Class XceedVistaGridStyleSheet
Inherits StyleSheet

Public Sub New()
Dim ImagePath As String = Application.StartupPath
ImagePath = ImagePath.Replace(“\bin\Debug”, “”)
ImagePath = ImagePath + “\XceedStyleSheetImages\”

Me.ColumnManagerRow.BackgroundImage = Image.FromFile(ImagePath + “ColumnHeaderBackground.jpg”)
Me.ColumnManagerRow.BackgroundImageAlignment = ContentAlignment.TopLeft
Me.ColumnManagerRow.BackgroundImageStyle = ImageStyle.Stretch

End Sub
End Class

If I add a data row and do the same properties the image shows up fine for every row… but nothing works w/the columnmanagerrow.backgroundimage properties…

Imported from legacy forums. Posted by jvelite (had 436 views)