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)