We have a RadDocking version 2013.1.220.40 with two floating RadPanes. Both RadPanes have as content another RadDocking with a layout.
When one of the two RadPanes comes on top of each other and the Compass appears we get the following exception:
System.InvalidOperationException: The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals.
at System.Windows.Media.Visual.TransformToVisual(Visual visual)
at Telerik.Windows.Controls.RadDocking.GetElementPositionAtHost(FrameworkElement host, FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.MoveCompassToElement(FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.ShowCompass()
at Telerik.Windows.Controls.RadDocking.OnDragElement(FrameworkElement draggedElement, Point relativeMousePosition, RadPaneGroup targetPaneGroup)
at Telerik.Windows.Controls.RadDocking.OnDragContainer(RadSplitContainer container, Point globalMousePosition)
at Telerik.Windows.Controls.RadDocking.OnToolWindowDrag(ToolWindow window, Point globalMousePosition)
at Telerik.Windows.Controls.Docking.ToolWindow.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.OnWindowPositionUpdating(Rect windowPosition)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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 System.Windows.Media.Visual.TransformToVisual(Visual visual)
at Telerik.Windows.Controls.RadDocking.GetElementPositionAtHost(FrameworkElement host, FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.MoveCompassToElement(FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.ShowCompass()
at Telerik.Windows.Controls.RadDocking.OnDragElement(FrameworkElement draggedElement, Point relativeMousePosition, RadPaneGroup targetPaneGroup)
at Telerik.Windows.Controls.RadDocking.OnDragContainer(RadSplitContainer container, Point globalMousePosition)
at Telerik.Windows.Controls.RadDocking.OnToolWindowDrag(ToolWindow window, Point globalMousePosition)
at Telerik.Windows.Controls.Docking.ToolWindow.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.OnWindowPositionUpdating(Rect windowPosition)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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)
We tried disabling the compass by using the PreviewShowCompass event, but that event is never called.
When one of the two RadPanes comes on top of each other and the Compass appears we get the following exception:
System.InvalidOperationException: The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals.
at System.Windows.Media.Visual.TransformToVisual(Visual visual)
at Telerik.Windows.Controls.RadDocking.GetElementPositionAtHost(FrameworkElement host, FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.MoveCompassToElement(FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.ShowCompass()
at Telerik.Windows.Controls.RadDocking.OnDragElement(FrameworkElement draggedElement, Point relativeMousePosition, RadPaneGroup targetPaneGroup)
at Telerik.Windows.Controls.RadDocking.OnDragContainer(RadSplitContainer container, Point globalMousePosition)
at Telerik.Windows.Controls.RadDocking.OnToolWindowDrag(ToolWindow window, Point globalMousePosition)
at Telerik.Windows.Controls.Docking.ToolWindow.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.OnWindowPositionUpdating(Rect windowPosition)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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 System.Windows.Media.Visual.TransformToVisual(Visual visual)
at Telerik.Windows.Controls.RadDocking.GetElementPositionAtHost(FrameworkElement host, FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.MoveCompassToElement(FrameworkElement element)
at Telerik.Windows.Controls.RadDocking.ShowCompass()
at Telerik.Windows.Controls.RadDocking.OnDragElement(FrameworkElement draggedElement, Point relativeMousePosition, RadPaneGroup targetPaneGroup)
at Telerik.Windows.Controls.RadDocking.OnDragContainer(RadSplitContainer container, Point globalMousePosition)
at Telerik.Windows.Controls.RadDocking.OnToolWindowDrag(ToolWindow window, Point globalMousePosition)
at Telerik.Windows.Controls.Docking.ToolWindow.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.OnWindowPositionUpdating(Rect windowPosition)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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)
We tried disabling the compass by using the PreviewShowCompass event, but that event is never called.
private
void
dockPanel_PreviewShowCompass(
object
sender, Telerik.Windows.Controls.Docking.PreviewShowCompassEventArgs e)
{
e.Compass.IsLeftIndicatorVisible =
false
;
e.Compass.IsTopIndicatorVisible =
false
;
e.Compass.IsRightIndicatorVisible =
false
;
e.Compass.IsBottomIndicatorVisible =
false
;
e.Compass.IsCenterIndicatorVisible =
false
;
}
// dockPanel_PreviewShowCompass
I think the InvalidOperationException exception and the fact the PreviewShowCompass isn't called should be fixed by Telerik.
Meanwhile Is there any workaround we can use?