This is a migrated thread and some comments may be shown as answers.

DefaultImageSrc unbound TreeView

7 Answers 119 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Paul Gallen
Top achievements
Rank 1
Paul Gallen asked on 18 May 2009, 02:26 PM
Hi I have a unbound treeview. It is populated via Load on demand. I require a style that can set my DefaultImageSrc depending a set of curcumstances, some like

<DataTrigger Binding="{Binding Path=IsFolder}" Value="True">  
                    <Setter Property="DefaultImageSrc" Value="../../folder.png" /> 
                </DataTrigger> 
                <DataTrigger Binding="{Binding Path=IsFolder}" Value="False">  
                    <Setter  Property="DefaultImageSrc" Value="../../diskdrive.png" /> 
                </DataTrigger> 

Can you give me an example

Thanks


P

7 Answers, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 18 May 2009, 03:41 PM
Hi Paul,

Please take a look at the following page from the documentation:

http://www.telerik.com/help/silverlight/radtreeview-item-images.html

If that info does not help you, let me know.

Sincerely yours,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul Gallen
Top achievements
Rank 1
answered on 18 May 2009, 03:52 PM
Tihomir,

Sorry, this does not help at all. treeviewitems are hard coded !!!


P
0
Tihomir Petkov
Telerik team
answered on 19 May 2009, 09:44 AM
Hello Paul,

I prepared a sample project for you to take a look at. Please let me know if it helps.

Best wishes,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul Gallen
Top achievements
Rank 1
answered on 19 May 2009, 11:21 AM
Thanks for your efforts Tihomir ,

Still is still not correct, you are still binding to your "Source", Like I mentioned earlier my treeview is not bound at all, It creates the treeviewitems manually


P
0
Tihomir Petkov
Telerik team
answered on 20 May 2009, 11:39 AM
Hi Paul,

Sorry for the misunderstanding but it seems I am missing something about your scenario. If you are adding manually your treeview items, I believe you should be able to pick the right image and set it in the time when you add the item to the tree. Is that not so? Please elaborate a bit more or send me a sample project which demonstrates the problem.

Sincerely yours,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul Gallen
Top achievements
Rank 1
answered on 20 May 2009, 04:43 PM
Hi Tihomir

I think you have answered my initial question (i think), I was hoping to use XAML to set my image for my nodes (style the treeview item) when the tree is in inbound mode. It looks like you cannot do that. I was setting the images in code. 

Am I correct in assuming that you cannot style the treeviewitem when in unbound mode


Thanks


P
0
Valentin.Stoychev
Telerik team
answered on 22 May 2009, 12:36 PM
Hi Paul Gallen,

we researched the problem and there is a problem with the binding of this property. We provide you a fix next week with the latest internal build.

All the best,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
Paul Gallen
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Paul Gallen
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or