LoadLayout with foating panel

0 Answers 69 Views
Docking
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Deltaohm asked on 20 Jan 2022, 08:12 AM

Hi

I have a window with a docking panel. I save the layout when I close the window. It works well, but if I undock a panel then loadlayout raise the following exception (I attached the xml layout file too)

System.ComponentModel.Win32Exception
  HResult=0x80004005
  Message=Operazione completata.
  Source=WindowsBase
  StackTrace:
   at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks)
   at System.Windows.Window.EnsureHiddenWindow()
   at System.Windows.Window.SetTaskbarStatus()
   at System.Windows.Window.CreateAllStyle()
   at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   at System.Windows.Window.CreateSourceWindowDuringShow()
   at System.Windows.Window.SafeCreateWindowDuringShow()
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
   at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
   at Telerik.Windows.Controls.Docking.ToolWindow.Open()
   at Telerik.Windows.Controls.RadDocking.ShowWindow(ToolWindow window, Boolean shouldReallyOpen)
   at Telerik.Windows.Controls.RadDocking.OpenInToolWindow(RadSplitContainer container, Boolean openImmediately)
   at Telerik.Windows.Controls.RadDocking.AddSplitContainer(RadSplitContainer radSplitContainer)
   at Telerik.Windows.Controls.Docking.DefaultDockingLayoutFactory.LoadDocking(LoadingParentElementArgs args)
   at Telerik.Windows.Controls.Docking.DefaultDockingLayoutFactory.LoadLayout(XmlReader reader)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source, Boolean raiseEventsIfNoSerializationTag)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source)
   at DeltaOhm.NsModules.View.MainPlotControl.LoadLayout() in D:\Progetti\NoiseStudioEx\NsModules\NsModules\View\ScottPlott\MainPlotControl.xaml.cs:line 446
   at DeltaOhm.NsModules.View.MainPlotControl.SpectralTimeHistoryControl_Loaded(Object sender, RoutedEventArgs e) in D:\Progetti\NoiseStudioEx\NsModules\NsModules\View\ScottPlott\MainPlotControl.xaml.cs:line 764
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

  This exception was originally thrown at this call stack:
    [External Code]
    DeltaOhm.NsModules.View.MainPlotControl.LoadLayout() in MainPlotControl.xaml.cs
    DeltaOhm.NsModules.View.MainPlotControl.SpectralTimeHistoryControl_Loaded(object, System.Windows.RoutedEventArgs) in MainPlotControl.xaml.cs
    [External Code]

Stenly
Telerik team
commented on 25 Jan 2022, 07:49 AM

Hello Gianluca,

I have prepared a sample project using the provided RadDocking layout, in order to get as close as possible to your current project scenario, however, I was not able to observe the specified exception. With that said, would it be possible for you to try the provided sample project, and let me know if I am missing something?

No answers yet. Maybe you can help?

Tags
Docking
Asked by
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Share this question
or