Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: AvalonDock causes a System.ArgumentNullException [22349]

$
0
0
version 2.5, 2.6 OK
version 2.9 NOT OK

=======
Exception:
System.ArgumentNullException was unhandled by user code
HResult=-2147467261
Message=Value cannot be null.
Parameter name: element
Source=PresentationFramework
ParamName=element
StackTrace:
at System.Windows.FrameworkElement.GetFlowDirection(DependencyObject element)
at Xceed.Wpf.AvalonDock.Controls.TransformExtensions.PointToScreenDPIWithoutFlowDirection(FrameworkElement element, Point point) in c:\Research\wpftoolkit\Main\Source\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.AvalonDock\Controls\TransformExtentions.cs:line 36
at Xceed.Wpf.AvalonDock.Controls.LayoutAutoHideWindowControl.ShowResizerOverlayWindow(LayoutGridResizerControl splitter) in c:\Research\wpftoolkit\Main\Source\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.AvalonDock\Controls\LayoutAutoHideWindowControl.cs:line 281
at Xceed.Wpf.AvalonDock.Controls.LayoutAutoHideWindowControl.OnResizerDragStarted(Object sender, DragStartedEventArgs e) in c:\Research\wpftoolkit\Main\Source\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.AvalonDock\Controls\LayoutAutoHideWindowControl.cs:line 444
at System.Windows.Controls.Primitives.DragStartedEventArgs.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.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.OnMouseDownThunk(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.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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
InnerException:

==== code ===
class TransformExtensions

```
public static Point PointToScreenDPIWithoutFlowDirection(this FrameworkElement element, Point point)
{
if (FrameworkElement.GetFlowDirection(element) == FlowDirection.RightToLeft)
{
var actualSize = element.TransformActualSizeToAncestor();
Point leftToRightPoint = new Point(
actualSize.Width - point.X,
point.Y);
return element.PointToScreenDPI(leftToRightPoint);
}

return element.PointToScreenDPI(point);
}
```

the execution arrives to the above function and the element object is null.

Basically i have a toolbox window on the left auto-hiding, when the window shows, i try to drag the frame to make it larger, then it crashes.

Any help please.


Thanks for reading.
Comments: ** Comment from web user: gsaulnier **

I reverted the change on line 270 of DockingManager.cs. I moved the call to SetupAutoHideWindow() back into OnApplyTemplate from DockingManager_Loaded (new in 2.9) and this fixes the crash.


Viewing all articles
Browse latest Browse all 4964

Trending Articles