Exception:元素已具有逻辑父级。将其附加到新的父级之前必须将其与旧父级断开。

报错信息 1
InvalidOperationException: 元素已具有逻辑父级。将其附加到新的父级之前必须将其与旧父级断开。
StackTrace:
   在 MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
   在 MS.Internal.Controls.InnerItemCollectionView.Add(Object item)
   在 System.Windows.Controls.ItemCollection.Add(Object newItem)
   在 DynamicClass.FloatingBallLiteManagePanel.m68(ma2 state, IEnumerable`1 items, UIElement m8o)
   在 DynamicClass.FloatingBallLiteManagePanel.<>c__DisplayClassf3.<m2a>b__f2(Object sender, RoutedEventArgs args)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.45.0 2026-03-15 22:05 Microsoft Windows NT 10.0.26100.0