Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exception in InternalUtils.DrawExpandButton when moving to .NET 10 (Read 553 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 169
Location: England
Joined: Oct 23rd, 2006
Exception in InternalUtils.DrawExpandButton when moving to .NET 10
Oct 27th, 2026 at 10:53am
Print Post  
I have recently upgraded my project to .NET 10 as .NET 8 will be out-of-support soon and I am now getting this exception...

Message : Parameter is not valid.
Source : System.Private.Windows.Core
Stack Trace :
at Windows.Win32.Graphics.GdiPlus.StatusExtensions.ThrowIfFailed(Status status)
at System.Drawing.Drawing2D.LinearGradientBrush.set_InterpolationColors(ColorBlend value)
at MindFusion.Drawing.GdiGraphics.(Brush ,  )
at MindFusion.Drawing.GdiGraphics.FillRectangle(Brush brush, RectangleF rect)
at MindFusion.Diagramming.InternalUtils.DrawExpandButton(IGraphics graphics, Boolean expanded, RectangleF bounds, MeasureUnit measureUnit, Brush shadowBrush)
at .Draw(IGraphics )
at MindFusion.Diagramming.DiagramNode.Draw(IGraphics graphics, RenderOptions options)
at MindFusion.Diagramming.Diagram.(IGraphics , RectangleF , Boolean )
at MindFusion.Diagramming.Diagram.Draw(IGraphics graphics, RenderOptions options, RectangleF clipRect, Boolean backBuffer)
at MindFusion.Diagramming.WinForms.DiagramView.(IGraphics , RectangleF , Boolean )
at MindFusion.Diagramming.WinForms.DiagramView.OnPaint(PaintEventArgs pe)
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 MindFusion.Common.WinForms.TouchControl.WndProc(Message& m)
at MindFusion.Diagramming.WinForms.DiagramView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, UInt32 msg, WPARAM wparam, LPARAM lparam)

This may be something to do with setting the Opacity of a ShapeNode.

DavidL
« Last Edit: Oct 27th, 2026 at 12:04pm by David Long »  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3534
Joined: Oct 19th, 2005
Re: Exception in InternalUtils.DrawExpandButton when moving to .NET 10
Reply #1 - Oct 27th, 2026 at 12:31pm
Print Post  
I could not reproduce this under .net 10, testing the DirTree example. Are you on current 7.2.2 version, and with what kind of nodes are you seeing the exception? Could you try copying your view, diagram and node appearance properties to DirTree code, to see which one makes it throw?

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3534
Joined: Oct 19th, 2005
Re: Exception in InternalUtils.DrawExpandButton when moving to .NET 10
Reply #2 - Oct 27th, 2026 at 12:35pm
Print Post  
Nevermind that, reproduced it by setting root.Opacity = 0.5f; Our developer will investigate.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3534
Joined: Oct 19th, 2005
Re: Exception in InternalUtils.DrawExpandButton when moving to .NET 10
Reply #3 - Oct 27th, 2026 at 1:03pm
Print Post  
... meanwhile you should be able work around it by setting the static Renderers.ExpandIconRenderer, passing images or a callback function to the ExpandIconRenderer instance.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3534
Joined: Oct 19th, 2005
Re: Exception in InternalUtils.DrawExpandButton when moving to .NET 10
Reply #4 - Oct 28th, 2026 at 4:59pm
Print Post  
This build should fix the exception -

https://www.nuget.org/packages/MindFusion.Diagramming/7.2.3-beta1

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 169
Location: England
Joined: Oct 23rd, 2006
Re: Exception in InternalUtils.DrawExpandButton when moving to .NET 10
Reply #5 - Oct 29th, 2026 at 9:28pm
Print Post  
Many thanks - that fixes the problem.
Regards
DavidL
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint