Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The control already has a visual parent. #14

Open
Artur-CValente opened this issue Jul 1, 2024 · 0 comments
Open

The control already has a visual parent. #14

Artur-CValente opened this issue Jul 1, 2024 · 0 comments

Comments

@Artur-CValente
Copy link

Artur-CValente commented Jul 1, 2024

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, IEnumerable1 items)
at Avalonia.Controls.Panel.ChildrenChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Avalonia.Collections.AvaloniaList1.NotifyAdd(T item, Int32 index) at Avalonia.Collections.AvaloniaList1.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.WeakEvent2.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.AvaloniaList1.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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant