Description
Could anyone give me a hint on what may be happening? I've tried some workarounds but sometimes this happens out of nowhere.
System.InvalidOperationException: The control already has a visual parent.
at Avalonia.Visual.ValidateVisualChild(Visual c)
at Avalonia.Collections.AvaloniaList1.InsertRange(Int32 index, IEnumerable
1 items)
at Avalonia.Controls.Panel.ChildrenChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Avalonia.Collections.AvaloniaList1.NotifyAdd(T item, Int32 index) at Avalonia.Collections.AvaloniaList
1.Insert(Int32 index, T item)
at Avalonia.Controls.Presenters.PanelContainerGenerator.InsertContainer(ItemsControl itemsControl, Controls children, Object item, Int32 index)
at Avalonia.Controls.Presenters.PanelContainerGenerator.g__Add|5_0(Int32 index, IEnumerable items, <>c__DisplayClass5_0&)
at Avalonia.Controls.Presenters.PanelContainerGenerator.OnItemsChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Avalonia.Controls.ItemsSourceView.Avalonia.Controls.Utils.ICollectionChangedListener.PostChanged(INotifyCollectionChanged sender, NotifyCollectionChangedEventArgs e)
at Avalonia.Controls.Utils.CollectionChangedEventManager.Entry.<Avalonia.Utilities.IWeakEventSubscriber<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.OnEvent>g__Notify|6_0(INotifyCollectionChanged incc, NotifyCollectionChangedEventArgs args, WeakReference1[] listeners) at Avalonia.Controls.Utils.CollectionChangedEventManager.Entry.Avalonia.Utilities.IWeakEventSubscriber<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.OnEvent(Object notifyCollectionChanged, WeakEvent ev, NotifyCollectionChangedEventArgs e) at Avalonia.Utilities.WeakEvent
2.Subscription.OnEvent(Object sender, TEventArgs eventArgs)
at Avalonia.Utilities.WeakEvents.<>c__DisplayClass5_0.<.cctor>b__5(Object _, NotifyCollectionChangedEventArgs e)
at Avalonia.Collections.AvaloniaList1.Add(T item) at Avalonia.Collections.AvaloniaList
1.System.Collections.IList.Add(Object value)
at Avalonia.Controls.ItemCollection.Add(Object value)
at Avalonia.Notification.Controls.NotificationMessageContainer.ManagerOnOnMessageQueued(Object sender, NotificationMessageManagerEventArgs args)
at Avalonia.Notification.NotificationMessageManager.TriggerMessageQueued(INotificationMessage message)
at Avalonia.Notification.NotificationMessageManager.Queue(INotificationMessage message)
at Avalonia.Notification.NotificationMessageBuilder.Queue()
at Helper.DialogHelper.ShowLoadingQueryNotification(String Header, String Message, INotificationMessageManager Manager) in Helper\DialogHelper.cs:line 26
at ViewModels.ProjectsPageViewModel.ExportProj(String ExportType) in ProjectsPageViewModel.cs:line 77