Standard-Toolkit: [Bug]: Page Drag&Drop/Floating exception

Describe the bug Exception when dragging a page inside a DockableWorkspace.

Only happens in 60.22.2.32.

Stack trace

   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   at Krypton.Toolkit.CommonHelper.ScaleImageForSizedDisplay(Image src, Single trgtWidth, Single trgtHeight)
   at Krypton.Toolkit.ButtonSpecView.GetImage(PaletteState state)
   at Krypton.Toolkit.RenderStandard.AllocateImageSpace(StandardContentMemento memento, IPaletteContent paletteContent, IContentValues contentValues, PaletteState state, Rectangle displayRect, RightToLeft rtl, Size[,]& allocation)
   at Krypton.Toolkit.RenderStandard.GetContentPreferredSize(ViewLayoutContext context, IPaletteContent palette, IContentValues values, VisualOrientation orientation, PaletteState state, Boolean composition, Boolean glowing)
   at Krypton.Toolkit.ViewDrawContent.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewLayoutDocker.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewComposite.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewDrawSplitCanvas.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewDrawButton.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewComposite.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewLayoutCenter.GetPreferredSize(ViewLayoutContext context)
   at Krypton.Toolkit.ViewDrawDocker.Layout(ViewLayoutContext context)
   at Krypton.Toolkit.ViewDecorator.Layout(ViewLayoutContext context)
   at Krypton.Toolkit.ViewDrawDocker.Layout(ViewLayoutContext context)
   at Krypton.Toolkit.ViewManager.Layout(ViewLayoutContext context)
   at Krypton.Toolkit.KryptonForm.CheckViewLayout()
   at Krypton.Toolkit.KryptonForm.WindowChromePaint(Graphics g, Rectangle bounds)
   at Krypton.Toolkit.VisualForm.OnNonClientPaint(IntPtr hWnd)
   at Krypton.Toolkit.VisualForm.OnWM_NCPAINT(Message& m)
   at Krypton.Toolkit.VisualForm.WndProc(Message& m)
   at Krypton.Docking.KryptonFloatingWindow.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

Steps to reproduce the behavior: Add a Form Add KryptonPanel Add DockableWorkspace to the panel

Setup docking manager on Form Load:

KryptonDockingWorkspace w = KryptonDockingManager.ManageWorkspace(kryptonDockableWorkspace);
KryptonDockingManager.ManageControl(kryptonPanel, w);
KryptonDockingManager.ManageFloating(this);

Add some page using KryptonDockingManager.AddToWorkspace()

In this minimal application it only throws exception when trying to drag a page. On another more complex application it also throws the same exception at form resize or even when trying to show the desktop.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Done! https://github.com/Krypton-Suite/Standard-Toolkit/issues/691

The help.exe has all the API docs I’m looking for at the moment! Thanks!

I put this code and then it is working for me

image