I am data binding my XamTree and I am using a DataTemplate for presentation.
I would like to set the Visibility property for each XamTreeItem based on the object that it is binding to.
I tried this...
<Style x:Name="XamTreeExpandedNodes" TargetType="igTree:XamTreeItem"> <Setter Property="Visibility" Value="{Binding Visible}"/> </Style>
I get a runtime error, just saying its not valid... Is there any way to do this?
Hi,
In Silverlight, you can not using Bindings in Styles.
However for that exact reason, we expose a property Called DefaultItemsContainer, that is of type DataTemplate. In that property, you must specify a XamTreeItem as the root item of the DataTemplate, however, you can then specify any bindings you want on the item, and we will use that as the item that will be generated when bind to yoru ItemSource.
Hope this helps,
-SteveZ
Thanks so much!