Skip to content

WinUI alternative for Wpf's CreateBitmapSourceFromHIcon. #7943

Answered by castorix
gautambjain asked this question in Q&A
Discussion options

You must be logged in to vote

Basically, I want to show a file's icon in a listview.I plan to use SHGetFileInfo to get HICON.

I think it is simpler to use GetThumbnailAsync, then you can set it as BitmapSource for a control
(like in the test I did in this thread : Set System.Drawing.Icon as Source for ImageIcon control - WinUI 3)

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@gautambjain
Comment options

@gautambjain
Comment options

@castorix
Comment options

@gautambjain
Comment options

Answer selected by gautambjain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants