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.

4 posts, 0 answers
  1. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 17 Apr 2013 Link to this post

    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?

  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 22 Apr 2013 Link to this post

    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.

  3. Misak
    Misak avatar
    3 posts
    Member since:
    Nov 2011

    Posted 27 Mar in reply to Ivo Link to this post

    Hi Ivo,
    Is this issue fixed in 2016.2.503.45 ?

    Thanks
  4. Nasko
    Admin
    Nasko avatar
    681 posts

    Posted 30 Mar Link to this post

    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.
Back to Top