예제 #1
0
 public override void Paste_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (ClipboardBufferData.CanGetFromClipboard() == true)
     {
         ClipboardBufferData data = ClipboardBufferData.GetFromClipboard();
         Paste(data);
     }
 }
예제 #2
0
        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;
                }
            }
        }