I have a WinForm application that used Xceed.Grid. When the grid loads, I get the following exception and the scrollbar is a large red X.
----------------------------------------------
Exception:
System.NullReferenceException
Object reference not set to an instance of an object.
----------------------------------------------
Stack InnerTrace:
at Xceed.UI.Adaptive.AdaptiveTheme.PaintHorizontalScrollBar(Graphics graphics, Rectangle rectangle, ScrollBarUIState uiState, Color foreColor, Color backColor, Double opacity, Rectangle leftButtonRectangle, Rectangle leftShaftRectangle, Rectangle thumbRectangle, Rectangle rightShaftRectangle, Rectangle rightButtonRectangle)
at Xceed.Grid.Controls.WinHorizontalScrollBar.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I can’t reproduce this on my local machine in a test environment. Only the client is experiencing the issue. They are running the application on Windows 7 if that helps.
Can someone help me figure out what’s happening? Thank you!