DataBinding Example for Menu

2 posts, 0 answers
  1. rob pemberton
    rob pemberton avatar
    1 posts
    Member since:
    Aug 2004

    Posted 18 Sep 2008 Link to this post

    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>
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 22 Sep 2008 Link to this post

    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.
  3. DevCraft banner
Back to Top