Exemplo n.º 1
0
 public override FrameworkElement GenerateClipboardPreviewPanel()
 {
     return(new Image
     {
         Source = BitmapExtension.ImageToBitMapImage(BitmapExtension.GetImageFromDataObject(dataObject.GetDataObject())),
         Stretch = Stretch.UniformToFill,
         HorizontalAlignment = HorizontalAlignment.Center
     });
 }
Exemplo n.º 2
0
 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()));
 }