title: NotImplementedException System.Windows.Clipboard.GetDataObjectInternal()
body: <p>I have never seen this error, it was thrown by .net code itself:</p>
  
  <pre><code>System.NotImplementedException: O método ou a operação não está implementada.
     em System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
     em System.Windows.Clipboard.GetDataObjectInternal()
     em System.Windows.Documents.TextEditorCopyPaste.OnQueryStatusPaste(Object target, CanExecuteRoutedEventArgs args)
     em System.Windows.Input.CommandBinding.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e)
     em System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
     em System.Windows.Input.CommandManager.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e)
     em System.Windows.UIElement.OnCanExecuteThunk(Object sender, CanExecuteRoutedEventArgs e)
     em System.Windows.Input.CanExecuteRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
     em System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
     em System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
     em System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
     em System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
     em System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
     em System.Windows.Input.RoutedCommand.CriticalCanExecuteWrapper(Object parameter, IInputElement target, Boolean trusted, CanExecuteRoutedEventArgs args)
     em System.Windows.Input.RoutedCommand.CanExecuteImpl(Object parameter, IInputElement target, Boolean trusted, Boolean&amp; continueRouting)
     em System.Windows.Input.RoutedCommand.CriticalCanExecute(Object parameter, IInputElement target, Boolean trusted, Boolean&amp; continueRouting)
     em System.Windows.Input.CommandManager.TransferEvent(IInputElement newSource, CanExecuteRoutedEventArgs e)
     em System.Windows.Input.CommandManager.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e)
     em System.Windows.UIElement.OnCanExecuteThunk(Object sender, CanExecuteRoutedEventArgs e)
     em System.Windows.Input.CanExecuteRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
     em System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
     em System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
     em System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
     em System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
     em System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
     em System.Windows.Input.RoutedCommand.CriticalCanExecuteWrapper(Object parameter, IInputElement target, Boolean trusted, CanExecuteRoutedEventArgs args)
     em System.Windows.Input.RoutedCommand.CanExecuteImpl(Object parameter, IInputElement target, Boolean trusted, Boolean&amp; continueRouting)
     em System.Windows.Input.RoutedCommand.CriticalCanExecute(Object parameter, IInputElement target, Boolean trusted, Boolean&amp; continueRouting)
     em MS.Internal.Commands.CommandHelpers.CanExecuteCommandSource(ICommandSource commandSource)
     em System.Windows.Controls.MenuItem.UpdateCanExecute()
     em System.Windows.Controls.MenuItem.OnCanExecuteChanged(Object sender, EventArgs e)
     em System.Windows.Input.CanExecuteChangedEventManager.HandlerSink.OnCanExecuteChanged(Object sender, EventArgs e)
     em System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener&amp; listener, Object sender, EventArgs args, Type managerType)
     em System.Windows.WeakEventManager.ListenerList.DeliverEvent(Object sender, EventArgs args, Type managerType)
     em System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
     em System.Windows.Input.CommandManager.RequerySuggestedEventManager.OnRequerySuggested(Object sender, EventArgs args)
     em System.Windows.Input.CommandManager.RaiseRequerySuggested(Object obj)
     em System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
     em System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
  </code></pre>
  
  <p>It happened in my WPF application, when I right-clicked a <code>TextBox</code>. When right-clicking <code>TextBox</code> it usually shows CTRL+C CTRL+V commands.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I <strong>don't have</strong> <em>handlers for copy, paste, cut</em>, however I've created my own context menu because I added another menu item. And I did it with a <code>Behavior</code></p>
  
  <pre><code>internal class VariableSelectorBehavior : Behavior&lt;TextBox&gt;
      {
  
          protected override void OnAttached()
          {
              base.OnAttached();
  
                  AssociatedObject.ContextMenu = CreateContextMenu();
          }
  
          private ContextMenu CreateContextMenu()
          {
              var viewModel = new VariableSelectorViewModel(IoC.Get&lt;IVariableList&gt;(), IsRequired, DataType);
              viewModel.VariableSelected += VariableSelected;
  
              var variableMenu = new MenuItem { Header = "Variables" };
              variableMenu.DataContext = viewModel;
              variableMenu.AddHandler(MenuItem.ClickEvent, new RoutedEventHandler(VariableMenuItemClick));
              variableMenu.SetBinding(MenuItem.ItemsSourceProperty, new Binding("Items"));
              variableMenu.SetBinding(MenuItem.VisibilityProperty, new Binding("HasItems")
              {
                  Source = variableMenu,
                  Converter = new BooleanToVisibilityConverter()
              });
  
              var separator = new Separator();
              separator.SetBinding(MenuItem.VisibilityProperty, new Binding("HasItems")
              {
                  Source = variableMenu,
                  Converter = new BooleanToVisibilityConverter()
              });
  
              var menu = new ContextMenu();
              menu.Items.Add(variableMenu);
              menu.Items.Add(separator);
              menu.Items.Add(new MenuItem { Command = ApplicationCommands.Cut });
              menu.Items.Add(new MenuItem { Command = ApplicationCommands.Copy });
              menu.Items.Add(new MenuItem { Command = ApplicationCommands.Paste });
  
              return menu;
          }
  }
  </code></pre>
  
  <p>Unfortunately, I couldn't reproduce this at all, several times I tried. Does anyone have a clue of what happened here?</p>