kris9542

Hi all

I am trying to display an image before a treeview item. I am able to achieve this by

placing an image tag in front of the treeview item. Is there a way to display the image using any of the properties of the treeviewitem

I have done something like this

<DockPanel>

<Image Source="SunRise.jpg" Height="15" Width="15">

<TreeViewItem Name=" " Header =" "/>

</Image>

</DockPanel>

Please let me know if there is a better way to place an image before a treeview item in WPF.

Thanks



Re: Windows Presentation Foundation (WPF) WPF Treeview image

Yi-Lun Luo - MSFT

Each TreeViewItem has an Items property. We can use something like:

<TreeViewItem>
<TreeViewItem.Items>
<Image Source="SunRise.jpg" Height="15" Width="15" />
<TextBlock>sth...</TextBlock>
</TreeViewItem.Items>
</TreeViewItem>






Re: Windows Presentation Foundation (WPF) WPF Treeview image

redjackl

can u plz help me out in this treeview

Image1 treeviewtiem

image2 treeviewitem

image3 treeviewitem

image4 treeviewitem

image5 treeviewitem

image6 treeviewitem

regards

redjackl