InvalidOperationException: 无法显式修改 Panel 的 Children 集合,它用作 ItemsControl 的 ItemsPanel。ItemsControl 生成 Panel 的子元素。 StackTrace: 在 System.Windows.Controls.UIElementCollection.VerifyWriteAccess() 在 System.Windows.Controls.UIElementCollection.Insert(Int32 index, UIElement element) 在 DynamicClass.列表项拖拽管理器.插入占位符(ItemsControl 容器, Int32 位置索引) 在 DynamicClass.列表项拖拽管理器.开始拖拽可视化(MouseEventArgs 参数) 在 DynamicClass.列表项拖拽管理器.鼠标移动处理(Object 发送者, MouseEventArgs 参数) 在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) 在 System.Windows.Input.InputManager.ProcessStagingArea() 在 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) 在 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 在 System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) 在 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 System.Windows.Interop.HwndSource.InputFilterMessage(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)