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

DataBinding Example for Menu

1 Answer 71 Views
Menu
This is a migrated thread and some comments may be shown as answers.
rob pemberton
Top achievements
Rank 1
rob pemberton asked on 18 Sep 2008, 04:41 PM

Do you have an examle for databinding the menu control to a list of items via a template.  This example doesn't seem to work for tree view - ItemTempate is not defined.

<telerik:RadTreeView x:Name="tree" ItemsSource="{Binding}">
 
<ItemTemplate>
   
<HierarchicalDataTemplate ItemsSource="{Binding Products}">
    
<DataTemplate>
      
<TextBlock Text="{Binding Name}" Foreground="Red" />
    
</DataTemplate>
    
<ItemTemplate>
     
<StackPanel Orientation="Horizontal">
       
<TextBlock Text="{Binding Name}" />
       
<TextBlock Margin="10,0,0,0" Text="{Binding Description}" />
     
</StackPanel>
    
</ItemTemplate>
   
</HierarchicalDataTemplate>
 
</ItemTemplate>
<
telerik:RadTreeView>

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 22 Sep 2008, 08:15 AM
Hi Rob,

You can find example of databinding menu with ItemTemplate here:
http://demos.telerik.com/silverlight/#Examples/Menu/DataSource


Greetings,
Hristo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Menu
Asked by
rob pemberton
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or