-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Sometimes, when you dockControl.Save(); your current layout (i.e. you have two left side panels one on top of the other) the saved XAML contains some unexpected ShowAsFloatingAction members.
When you subsequently try to dockControl.Load() your saved layout a debug assert is thrown from DockManager.WindowHandler.cs:
private void InitNativeStrategy()
{
Debug.Assert(DockControl.FloatingWindows.Count == 0);
DockControl.FloatingWindows.CollectionChanged += new NotifyCollectionChangedEventHandler(OnFloatingWindowsChanged);
}
If you ignore it and continue, whenever you try to change the dockitems layout moving around panels, the app crashes with a NullReferenceExeption:
private void ShowOverlayWindow()
{
_overlayWindow = OverlayWindow.Show(DockControl);
SetStartMousePosition(_overlayWindow, _overlayWindow.PointFromScreen(_startMousePoint));
foreach (FloatingWindow floatingWindow in DockControl.FloatingWindows)
{
NativeFloatingWindow nativeWindow = NativeFloatingWindow.GetNativeFloatingWindow(floatingWindow); //NativeFloatingWindow is null
SetStartMousePosition(nativeWindow, nativeWindow.PointFromScreen(_startMousePoint));
}
}
Anybody knows how to solve this?