public override FrameworkElement GenerateClipboardPreviewPanel() { return(new Image { Source = BitmapExtension.ImageToBitMapImage(BitmapExtension.GetImageFromDataObject(dataObject.GetDataObject())), Stretch = Stretch.UniformToFill, HorizontalAlignment = HorizontalAlignment.Center }); }
public override bool MatchesClipboard() // TODO: fix equality check { return(Clipboard.ContainsImage() && BitmapExtension.GetImageFromDataObject(new SerializableDataObject(Clipboard.GetDataObject()).GetDataObject()).ToBytes().SequenceEqual(BitmapExtension.GetImageFromDataObject(dataObject.GetDataObject()).ToBytes())); }