manio143 / StrideComponentsEditorAvalonia

Experimental mini Stride.Editor in Avalonia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moving tabs around does not work

manio143 opened this issue · comments

Undocking a tab doesn't create a window with it.
Redocking a tab to another dock causes an unrecoverable exception - might this be connected to the reuse of ContentControl in ViewDataTemplate (if so, how to detect potential parent change in its Build(object)?)

 System.InvalidOperationException: The control already has a visual parent.
   at Avalonia.Visual.ValidateVisualChild(IVisual c) in D:\a\1\s\src\Avalonia.Visuals\Visual.cs:line 506
   at Avalonia.Collections.AvaloniaList`1.Add(T item) in D:\a\1\s\src\Avalonia.Base\Collections\AvaloniaList.cs:line 190
   at Avalonia.Controls.Presenters.ContentPresenter.UpdateChild() in D:\a\1\s\src\Avalonia.Controls\Presenters\ContentPresenter.cs:line 265
   at Avalonia.Controls.ItemsControl.OnContainersMaterialized(ItemContainerEventArgs e) in D:\a\1\s\src\Avalonia.Controls\ItemsControl.cs:line 247
   at Avalonia.Controls.Primitives.SelectingItemsControl.OnContainersMaterialized(ItemContainerEventArgs e) in D:\a\1\s\src\Avalonia.Controls\Primitives\SelectingItemsControl.cs:line 362
   at Avalonia.Controls.ItemsControl.<get_ItemContainerGenerator>b__12_0(Object _, ItemContainerEventArgs e) in D:\a\1\s\src\Avalonia.Controls\ItemsControl.cs:line 94
   at Avalonia.Controls.Generators.ItemContainerGenerator.Materialize(Int32 index, Object item) in D:\a\1\s\src\Avalonia.Controls\Generators\ItemContainerGenerator.cs:line 64
   at Avalonia.Controls.Presenters.ItemContainerSync.AddContainers(ItemsPresenterBase owner, Int32 index, IEnumerable items) in D:\a\1\s\src\Avalonia.Controls\Presenters\ItemContainerSync.cs:line 91
   at Avalonia.Controls.Presenters.ItemContainerSync.<ItemsChanged>g__Add|0_0(<>c__DisplayClass0_0& ) in D:\a\1\s\src\Avalonia.Controls\Presenters\ItemContainerSync.cs:line 33
   at Avalonia.Controls.Presenters.ItemContainerSync.ItemsChanged(ItemsPresenterBase owner, IEnumerable items, NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Controls\Presenters\ItemContainerSync.cs:line 43
   at Avalonia.Controls.Presenters.CarouselPresenter.ItemsChanged(NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Controls\Presenters\CarouselPresenter.cs:line 102
   at Avalonia.Controls.Presenters.ItemsPresenterBase.Avalonia.Controls.Presenters.IItemsPresenter.ItemsChanged(NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Controls\Presenters\ItemsPresenterBase.cs:line 156
   at Avalonia.Controls.ItemsControl.ItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Controls\ItemsControl.cs:line 394
   at Avalonia.Controls.Primitives.SelectingItemsControl.ItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Controls\Primitives\SelectingItemsControl.cs:line 321
   at Avalonia.Collections.NotifyCollectionChangedExtensions.<>c__DisplayClass1_0.<WeakSubscribe>b__0(NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Base\Collections\NotifyCollectionChangedExtensions.cs:line 43
   at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value) in D:\a\1\s\src\Avalonia.Base\Reactive\LightweightObservableBase.cs:line 132
   at Avalonia.Collections.NotifyCollectionChangedExtensions.WeakCollectionChangedObservable.OnEvent(Object sender, NotifyCollectionChangedEventArgs e) in D:\a\1\s\src\Avalonia.Base\Collections\NotifyCollectionChangedExtensions.cs:line 77
   at Avalonia.Utilities.WeakSubscriptionManager.Subscription`1.OnEvent(Object sender, T eventArgs) in D:\a\1\s\src\Avalonia.Base\Utilities\WeakSubscriptionManager.cs:line 187
   at Avalonia.Collections.AvaloniaList`1.NotifyAdd(T item, Int32 index) in D:\a\1\s\src\Avalonia.Base\Collections\AvaloniaList.cs:line 582
   at Avalonia.Collections.AvaloniaList`1.Insert(Int32 index, T item) in D:\a\1\s\src\Avalonia.Base\Collections\AvaloniaList.cs:line 297
   at Dock.Model.FactoryBase.MoveDockable(IDock sourceDock, IDock targetDock, IDockable sourceDockable, IDockable targetDockable) in D:\a\1\s\src\Dock.Model\FactoryBase.cs:line 581
   at Dock.Model.DockManager.MoveDockable(IDockable sourceDockable, IDock sourceDockableOwner, IDock targetDock, Boolean bExecute) in D:\a\1\s\src\Dock.Model\DockManager.cs:line 51
   at Dock.Model.DockManager.DockDockable(IDockable sourceDockable, IDock sourceDockableOwner, IDock targetDock, DockOperation operation, Boolean bExecute) in D:\a\1\s\src\Dock.Model\DockManager.cs:line 253
   at Dock.Model.DockManager.DockDockableIntoDock(IDockable sourceDockable, IDock sourceDockableOwner, IDock targetDock, DragAction action, DockOperation operation, Boolean bExecute) in D:\a\1\s\src\Dock.Model\DockManager.cs:line 277
   at Dock.Model.DockManager.DockDockableIntoDockVisible(IDock sourceDock, IDock targetDock, DragAction action, DockOperation operation, Boolean bExecute) in D:\a\1\s\src\Dock.Model\DockManager.cs:line 286
   at Dock.Model.DockManager.ValidateDock(IDock sourceDock, IDockable targetDockable, DragAction action, DockOperation operation, Boolean bExecute) in D:\a\1\s\src\Dock.Model\DockManager.cs:line 392
   at Dock.Avalonia.DockControlState.Execute(Point point, DockOperation operation, DragAction dragAction, IVisual relativeTo) in D:\a\1\s\src\Dock.Avalonia\DockControlState.cs:line 109
   at Dock.Avalonia.DockControlState.Drop(Point point, DragAction dragAction, IVisual relativeTo) in D:\a\1\s\src\Dock.Avalonia\DockControlState.cs:line 67
   at Dock.Avalonia.DockControlState.Process(Point point, Vector delta, EventType eventType, DragAction dragAction, IVisual activeDockControl, IList`1 dockControls) in D:\a\1\s\src\Dock.Avalonia\DockControlState.cs:line 181
   at Dock.Avalonia.Controls.DockControl.Released(Object sender, PointerReleasedEventArgs e) in D:\a\1\s\src\Dock.Avalonia\Controls\DockControl.cs:line 96
   at Avalonia.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 206
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 323
   at Avalonia.Interactivity.Interactive.TunnelEvent(RoutedEventArgs e) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 185
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in D:\a\1\s\src\Avalonia.Interactivity\Interactive.cs:line 140
   at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers) in D:\a\1\s\src\Avalonia.Input\MouseDevice.cs:line 277
   at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) in D:\a\1\s\src\Avalonia.Input\MouseDevice.cs:line 128
   at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in D:\a\1\s\src\Avalonia.Input\InputManager.cs:line 40
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in D:\a\1\s\src\Windows\Avalonia.Win32\WindowImpl.cs:line 762
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in D:\a\1\s\src\Windows\Avalonia.Win32\Win32Platform.cs:line 121
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in D:\a\1\s\src\Avalonia.Base\Threading\Dispatcher.cs:line 65
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in D:\a\1\s\src\Avalonia.Controls\ApplicationLifetimes\ClassicDesktopStyleApplicationLifetime.cs:line 106
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in D:\a\1\s\src\Avalonia.Controls\ApplicationLifetimes\ClassicDesktopStyleApplicationLifetime.cs:line 128
   at Stride.Editor.Program.Main(String[] args) in D:\Documents\Stride Projects\StrideComponentsEditorAvalonia\Stride.Editor\Program.cs:line 17