Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't have an exact answer to your question but I can think of two ways to proceed with -</p> <ol> <li><p>Associate a <code>CommandBinding</code> for Copy/Paste operation, with your controls and perform custom operations in <code>Execute</code> and <code>CanExecute</code> methods. As explained here:</p> <blockquote> <p><a href="http://msdn.microsoft.com/en-us/library/system.windows.input.commandbinding.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.windows.input.commandbinding.aspx</a></p> </blockquote></li> <li><p>Use <code>DataObject</code> class to intercept the Copy/Paste events and perform your custom operation there. i.e. <a href="http://msdn.microsoft.com/en-us/library/system.windows.dataobject.addcopyinghandler.aspx" rel="nofollow noreferrer"><code>DataObject.AddCopyingHandler</code></a> and <a href="http://msdn.microsoft.com/en-us/library/system.windows.dataobject.addpastinghandler.aspx" rel="nofollow noreferrer"><code>DataObject.AddPastingHandler</code></a>.</p> <p>Some useful links -</p> <blockquote> <p><a href="http://msdn.microsoft.com/en-us/library/system.windows.dataobject_members.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.windows.dataobject_members.aspx</a></p> <p><a href="http://blogs.msdn.com/b/prajakta/archive/2006/11/28/auto-detecting-hyperlinks-in-richtextbox-part-ii.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/b/prajakta/archive/2006/11/28/auto-detecting-hyperlinks-in-richtextbox-part-ii.aspx</a></p> </blockquote></li> </ol> <p>Hope that will help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload