ComponentFactory / Krypton

Krypton WinForms components for .NET
BSD 3-Clause "New" or "Revised" License
1.88k stars 691 forks source link

IndexOutOfRangeException with certain themes like Dark and itemstyle= navigatorstack using KryptonListBox #242

Open almendieta opened 1 year ago

almendieta commented 1 year ago

System.IndexOutOfRangeException HResult=0x80131508 Mensaje = Índice fuera de los límites de la matriz. Origen = Krypton.Toolkit Seguimiento de la pila: at Krypton.Toolkit.PaletteOffice365BlackDarkModeBase.GetBackColor2(PaletteBackStyle style, PaletteState state) at Krypton.Toolkit.PaletteRedirect.GetBackColor2(PaletteBackStyle style, PaletteState state) at Krypton.Toolkit.PaletteBackInheritRedirect.GetBackColor2(PaletteState state) at Krypton.Toolkit.PaletteBack.GetBackColor2(PaletteState state) at Krypton.Toolkit.PaletteBack.GetBackColor2(PaletteState state) at Krypton.Toolkit.PaletteBackInheritOverride.GetBackColor2(PaletteState state) at Krypton.Toolkit.RenderStandard.DrawBack(RenderContext context, Rectangle rect, GraphicsPath path, IPaletteBack palette, VisualOrientation orientation, PaletteState state, IDisposable memento) at Krypton.Toolkit.ViewDrawSplitCanvas.DrawBackground(RenderContext context, Rectangle rect, IPaletteBack paletteBack, IPaletteBorder paletteBorder, PaletteState state) at Krypton.Toolkit.ViewDrawSplitCanvas.RenderBackground(RenderContext context, Rectangle rect) at Krypton.Toolkit.ViewDrawSplitCanvas.RenderBefore(RenderContext context) at Krypton.Toolkit.ViewComposite.Render(RenderContext context) at Krypton.Toolkit.ViewComposite.Render(RenderContext context) at Krypton.Toolkit.ViewDrawButton.Render(RenderContext context) at Krypton.Toolkit.KryptonListBox.OnListBoxDrawItem(Object sender, DrawItemEventArgs e) at System.Windows.Forms.ListBox.OnDrawItem(DrawItemEventArgs e) at System.Windows.Forms.ListBox.WmReflectDrawItem(Message& m) at System.Windows.Forms.ListBox.WndProc(Message& m) at Krypton.Toolkit.KryptonListBox.InternalListBox.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m) at System.Windows.Forms.Control.WmOwnerDraw(Message& m) at System.Windows.Forms.Control.WmDrawItem(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Krypton.Toolkit.VisualControlBase.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(Message& m) at Krypton.Toolkit.KryptonListBox.InternalListBox.WmPaint(Message& m) at Krypton.Toolkit.KryptonListBox.InternalListBox.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

PWagner1 commented 1 year ago

Hi @almendieta

I think this should be posted to our repo, since 'dark' themes do not exist in this version