This is a migrated thread and some comments may be shown as answers.

RadPane 20131.220.40: System.InvalidOperationException: The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals.

3 Answers 86 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Pieter
Top achievements
Rank 2
Pieter asked on 17 Apr 2013, 08:56 AM
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.

 

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?

3 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 22 Apr 2013, 08:11 AM
Hi Pieter,

We successfully reproduced this at our side. Currently nested RadDocking controls are not supported, but we are investigating issues related to such scenarios. We can confirm this is an issue and we will do our best to fix it for the Q2 SP1 version of RadControls for WPF.

Thank you for your feedback.

Kind regards,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Misak
Top achievements
Rank 1
answered on 27 Mar 2017, 12:18 PM
Hi Ivo,
Is this issue fixed in 2016.2.503.45 ?

Thanks
0
Nasko
Telerik team
answered on 30 Mar 2017, 06:17 AM
Hello Misak,

The issue is fixed and everything should be working as expected with version 2016.2.503. We are also glad to inform you that since versions Q1 2014 RadDocking support nested RadDocking scenarios
and the AllowUnsafeMode should no longer be used.

We hope the provided information will be helpful for you.

Regards,
Nasko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Docking
Asked by
Pieter
Top achievements
Rank 2
Answers by
Ivo
Telerik team
Misak
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or