Exception:指定的 Visual 已经是另一个 Visual 的子级或者已经是 CompositionTarget 的根。

报错信息 1
ArgumentException: 指定的 Visual 已经是另一个 Visual 的子级或者已经是 CompositionTarget 的根。
--Message: 指定的 Visual 已经是另一个 Visual 的子级或者已经是 CompositionTarget 的根。
StackTrace:
   在 System.Windows.Media.VisualCollection.Insert(Int32 index, Visual visual)
   在 System.Windows.Controls.UIElementCollection.InsertInternal(Int32 index, UIElement element)
   在 DynamicClass.文本跑马灯控制器.Dispose()
   在 DynamicClass.MainWindow.Cleanup()
   在 DynamicClass.a.<>c__DisplayClass1.<OnWindowCreated>b__0(Object s, EventArgs e)
   在 System.EventHandler.Invoke(Object sender, EventArgs e)
   在 System.Windows.Window.OnClosed(EventArgs e)
   在 System.Windows.Window.WmDestroy()
   在 System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 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.44.55 2026-04-15 20:20 Microsoft Windows NT 10.0.28000.0