How can I mix static and dynamic items in Telerik's RadMenu for Silverlight?

2 posts, 0 answers
  1. Jeffrey Lott
    Jeffrey Lott avatar
    2 posts
    Member since:
    Jan 2010

    Posted 19 Jan 2012 Link to this post

    I'm using Telerik's controls for Silverlight and I'm trying to get my data bound items to append to the end of my statically defined ones. I'm using the following code right now:

    telerikNavigation:RadMenuItem Header="Tag Categories" ItemsSource="{Binding SelectedItem.TagCategories}" 
                               
    DisplayMemberPath="Code" >
    <telerikNavigation:RadMenuItem Header="Create New" Command="{Binding AddNewTagCategoryCommand}" CommandParameter="{Binding SelectedTagCategory}">
       
    <telerikNavigation:RadMenuItem.Icon>
           
    <Image Style="{StaticResource ImageAddSmall}" />
       
    </telerikNavigation:RadMenuItem.Icon>
    </
    telerikNavigation:RadMenuItem>
    <telerikNavigation:RadMenuItem Header="Manage">
       
    <telerikNavigation:RadMenuItem.Icon>
           
    <Image Style="{StaticResource ImageEditSmall}"/>
       
    </telerikNavigation:RadMenuItem.Icon>
    </
    telerikNavigation:RadMenuItem>
    <telerikNavigation:RadSeparator />

    Unfortunately it's overwriting my statically defined items ("Create New" and "Manage") with the ones off of the ItemsSource. Is there some way to get both to place nice together?

  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 21 Jan 2012 Link to this post

    Hello Jeffrey,

    You cannot mix static and dynamic items - this is two different ways of setting the ItemsSource of the menu. I can suggest you to add the static items in your collection.

    Kind regards,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
Back to Top