Hi,
I have a custom data object called MenuOption which looks like this:
I would like to build a RadToolBar by binding this object to the ItemsSource property and using templates.
I thought at first that using a converter might be the proper solution and tried recursively iterating thruogh the items and building the controls as needed. Then I ran into problems attaching events to the controls. I have tried some other things without success either.
Should I be looking at the ItemTemplateSelector to accomplish this since each individual MenuOption would possibly be a different control (Button, CheckBox, etc...)?
I have a custom data object called MenuOption which looks like this:
public class MenuOption
{
public string Caption { get; set; }
public string ImagePath { get; set; }
public ObservableCollection<MenuOption> Items { get; set; }
}
I would like to build a RadToolBar by binding this object to the ItemsSource property and using templates.
<TNC:RadToolBarTray>
<TNC:RadToolBar x:Name="mnuResult" ItemsSource="{Binding Path=ToolbarMenu.Items}" />
</TelerikNavigationControls:RadToolBarTray>
I thought at first that using a converter might be the proper solution and tried recursively iterating thruogh the items and building the controls as needed. Then I ran into problems attaching events to the controls. I have tried some other things without success either.
Should I be looking at the ItemTemplateSelector to accomplish this since each individual MenuOption would possibly be a different control (Button, CheckBox, etc...)?