private static void RaiseClipboardUpdated(ClipboardChangedEventArgs e) { var handler = ClipboardUpdated; if (handler != null) { handler(null, e); } }
private void OnClipboardUpdated() { var iData = Clipboard.GetDataObject(); if (iData != null) { var args = new ClipboardChangedEventArgs(); if (iData.GetDataPresent(DataFormats.Bitmap)) { args.BitmapSource = iData.GetData(DataFormats.Bitmap) as BitmapSource; } if (iData.GetDataPresent(DataFormats.Text)) { args.Text = iData.GetData(DataFormats.Text) as string; } RaiseClipboardUpdated(args); } }