public override void Paste_Executed(object sender, ExecutedRoutedEventArgs e) { if (ClipboardBufferData.CanGetFromClipboard() == true) { ClipboardBufferData data = ClipboardBufferData.GetFromClipboard(); Paste(data); } }
public override void Paste_CanExecute(object sender, CanExecuteRoutedEventArgs e) { if (ClipboardBufferData.CanGetFromClipboard() == true) { ClipboardBufferData data = ClipboardBufferData.GetFromClipboard(); ClipboardBufferData.SendToClipboard(data); bool res = CanPaste(data); if (res == true) { e.CanExecute = true; } } }