Hi,
if we try to use the latest version 3.4.1, we deterministically obtain the following exception.
If we revert back to the previous we've no problems.
This is the constructor of our derived FreeformNode:
public ClusterNode(string id, Point[] hullPoints, Cluster data, List<ClusterCompanyNode> nodes)
{
EnabledHandles = AdjustmentHandles.None;
Obstacle = false;
IsEnabled = false;
Focusable = false;
HandlesStyle = MindFusion.Diagramming.Wpf.HandlesStyle.Invisible;
Points = new StylusPointCollection(hullPoints);
this.UpdateFromPoints();
ZIndex = 0;
Closed = true;
Stroke = Brushes.Transparent;
StrokeThickness = 0f;
Id = CLUST_NODE_ID_PREFIX + id;
IncludedNodes = nodes;
UpdateStyles(data);
(this as IHighlightable).Highlight(false, 95, false);
}
Another relative little problem in the 3.4.0 version, was that the stroke of the node, when set, was never taken into account, but always rendered in black
System.ArgumentOutOfRangeException' occurred in PresentationCore.dll
Height must be greater than or equal to DrawingAttributes.MinHeight and less than or equal to DrawingAttribute.MaxHeight.
Parameter name: Height at System.Windows.Ink.DrawingAttributes.set_Height(Double value)
at MindFusion.Diagramming.Wpf.FreeFormNode.DrawLocal(DrawingContext graphics, RenderOptions options)
at MindFusion.Diagramming.Wpf.DiagramNode.Draw(DrawingContext graphics, RenderOptions options)
at System.Windows.UIElement.Arrange(Rect finalRect)
at A.S.W(Visual S)
at MindFusion.Diagramming.Wpf.Diagram.WJ(Visual S)
at MindFusion.Diagramming.Wpf.Diagram.AJ(DiagramItem S)
at MindFusion.Diagramming.Wpf.Commands.AddItemCmd.Execute(Boolean undoEnabled)
at MindFusion.Diagramming.Wpf.UndoManager.C(Command S)
at MindFusion.Diagramming.Wpf.Diagram.DJ(DiagramItem S, Boolean O)
at MindFusion.Diagramming.Wpf.Diagram.OnAddingItem(Object sender, ItemEventArgs e)
at MindFusion.Diagramming.Wpf.ItemCollectionBase`1.RaiseAdding(UIElement item)
at ITSB2B.RepSys.Diagrams.Intercompany.Helpers.ClusterAnalysisHelper.AddClusters(Diagram diagram, IEnumerable`1 companies, ClusterDataCollection clustersData, IEnumerable`1 clusterFilters) in D:\DEV\RepSys\1000_RepsysMovements\Routing\Helpers\ClusterAnalysisHelper.cs:line 663
at ITSB2B.RepSys.Diagrams.Intercompany.Controls.ClustersViewer.RebuildClusterNodes() in D:\DEV\RepSys\1000_RepsysMovements\Routing\Controls\ClustersViewer.xaml.cs:line 1395
at ITSB2B.RepSys.Diagrams.Intercompany.Controls.ClustersViewer.clusterTimerTick(Object sender, EventArgs e) in D:\DEV\RepSys\1000_RepsysMovements\Routing\Controls\ClustersViewer.xaml.cs:line 364
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at ITSB2B.RepSys.Diagrams.Intercompany.App.Main() in D:\DEV\RepSys\1000_RepsysMovements\Routing\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()