erm.. when i drag out a node to another view, then i redraw all the contents of the Diagram (to take out the dragged-out node) all looks fine.
But, when i try drag again another node, (just starting the drag within diagram) - i think the Diagram.Interaction never settled to null - i get a bad crash like:
bject reference not set to an instance of an object. | System.NullReferenceException: Object reference not set to an instance of an object. at MindFusion.Diagramming.Wpf.DiagramNode.DP(Rect A, Point B, InteractionState C) at MindFusion.Diagramming.Wpf.DiagramNode.YO(Rect A, Rect B, Point C, AdjustmentHandles D, InteractionState E) at MindFusion.Diagramming.Wpf.DiagramNode.AllowModify(Point current, InteractionState ist) at MindFusion.Diagramming.Wpf.InteractionState.ValidateAndSetCursor(Point point, Diagram diagram) at MindFusion.Diagramming.Wpf.Behaviors.BehaviorBase.OnMouseMove(Point mousePosition) at MindFusion.Diagramming.Wpf.Diagram.OnPreviewMouseMove(MouseEventArgs e) at System.Windows.UIElement.OnPreviewMouseMoveThunk(Object sender, MouseEventArgs e) at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at MindFusion.Diagramming.Wpf.DiagramNode.DP(Rect A, Point B, InteractionState C) at MindFusion.Diagramming.Wpf.DiagramNode.YO(Rect A, Rect B, Point C, AdjustmentHandles D, InteractionState E) at MindFusion.Diagramming.Wpf.DiagramNode.AllowModify(Point current, InteractionState ist) at MindFusion.Diagramming.Wpf.InteractionState.ValidateAndSetCursor(Point point, Diagram diagram) at MindFusion.Diagramming.Wpf.Behaviors.BehaviorBase.OnMouseMove(Point mousePosition) at MindFusion.Diagramming.Wpf.Diagram.OnPreviewMouseMove(MouseEventArgs e) at System.Windows.UIElement.OnPreviewMouseMoveThunk(Object sender, MouseEventArgs e) at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
... any ideas how to settle the interaction down after a changed no of nodes in diagram?
thx
(PS noone else posts here anymore?)
|