How can I change the TreeView Icon into a folder icon in WPF?

Incidentally I did something like this just a few days ago. In my application a folder icon is added in the erarchicalDataTemplate to those objects which behave like folders, I use a trigger to change the icon based on whether the item is expanded or not, here's the relevant bit of XAML.

Incidentally I did something like this just a few days ago. In my application a folder icon is added in the erarchicalDataTemplate to those objects which behave like folders, I use a trigger to change the icon based on whether the item is expanded or not, here's the relevant bit of XAML: Where {StaticResource Icon_FolderOpen} and {StaticResource Icon_FolderClosed} are BitmapImages that hold the icons for the folder states. IconImageStyleSmall is a style which sets the MaxWidth and MaxHeight of the images to something appropriate.

Edit: For completion's sake. Icons used.

Thx H. B this helped me! :D Now I only need to fix the layout of the icons ;) – KDP Mar 22 at 13:52 Also fixed the layout many thanx!

– KDP Mar 22 at 13:59.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions