We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ded089 commit 1aac33aCopy full SHA for 1aac33a
1 file changed
windows.applicationmodel.datatransfer/transfertarget_displayicon.md
@@ -40,10 +40,13 @@ var icon = transferTarget.DisplayIcon;
40
if (icon != null)
41
{
42
// Use the icon in the UI
43
- Console.WriteLine("Icon retrieved successfully.");
+ var bitmapImage = new BitmapImage();
44
+ bitmapImage.SetSource(await icon.OpenReadAsync());
45
+ myImageControl.Source = bitmapImage;
46
}
47
else
48
- Console.WriteLine("No icon available for this target.");
49
+ // Handle the case where no icon is available
50
+ myImageControl.Source = null;
51
52
```
0 commit comments