Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
'System.Windows.Documents.Run' error when clicking XamDataTree node.
posted

I am using a XamDataTree. When I click on any node in the tree and then click on WPF MenuItem, I get following error.

Not sure what is causing this error, looks like it has something to do with  XamDataTree_MouseLeftButtonUp event.

I even tried to add the event handler for this event. Most of the times this event is not fired. Even when this event is fired I still get this error. It is a random behavior. Could you please help me out.

'System.Windows.Documents.Run' is not a Visual or Visual3D.

Stack Trace:    at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)

   at Infragistics.Controls.Menus.XamDataTree.GetNodeFromSource(DependencyObject obj)

   at Infragistics.Controls.Menus.XamDataTree.XamDataTree_MouseLeftButtonUp(Object sender, MouseButtonEventArgs e)

   at System.Windows.Input.MouseButtonEventArgs.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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

   at System.Windows.Input.MouseButtonEventArgs.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.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)

   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)