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.

2 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. UI for WPF is Visual Studio 2017 Ready
Back to Top