ArgumentException: 字符偏移量 10 在具有 9 字符的文档中无效。 --Message: 字符偏移量 10 在具有 9 字符的文档中无效。 StackTrace: 在 System.Windows.Documents.TextStore.ValidateCharOffset(Int32 offset) 在 System.Windows.Documents.TextStore.MS.Win32.UnsafeNativeMethods.ITextStoreACP.GetTextExt(Int32 viewCookie, Int32 startIndex, Int32 endIndex, RECT& rect, Boolean& clipped) 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) 在 System.Windows.Clipboard.GetDataObjectInternal() 在 System.Windows.Documents.TextEditorCopyPaste.OnQueryStatusPaste(Object target, CanExecuteRoutedEventArgs args) 在 System.Windows.Input.CommandBinding.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e) 在 System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute) 在 System.Windows.Input.CommandManager.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e) 在 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.Input.RoutedCommand.CanExecuteImpl(Object parameter, IInputElement target, Boolean trusted, Boolean& continueRouting) 在 MS.Internal.Commands.CommandHelpers.CanExecuteCommandSource(ICommandSource commandSource) 在 System.Windows.Controls.MenuItem.UpdateCanExecute() 在 System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener& listener, Object sender, EventArgs args, Type managerType) 在 System.Windows.WeakEventManager.ListenerList.DeliverEvent(Object sender, EventArgs args, Type managerType) 在 System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) 在 System.Windows.Input.CommandManager.RaiseRequerySuggested(Object obj) 在 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)