Dear Telerik-Team,
we have a RadMenu that has bound his data over a ViewModel. Depending on the data we want to generate RadMenuGroupItems or RadMenuItems.
The bound data class is this:
public class MenuItem
{
public List<MenuItem> SubItems { get; set; }
public string Text { get; set; }
public Type EditUserControlType { get; set; }
public Action<object> Navigate;
public int RowIndex { get; set; }
public int ColumnIndex { get; set; }
public MenuItem()
{
SubItems = new List<MenuItem>();
}
}
if the MenuItem has SubItems we want that a RadMenuGroupItem is dynamically created. If the MenuItem has no SubItems we want that a RadMenuItem is created.
Is there a similar way of Item Creation like the dynamic assignemnt of Styles over the property "ItemContainerStyleSelector". We need something called "ItemContainerControlSelector"
but we didn't find anything in the documentation.
Important: We don't want to create the items dynamicalle in code behind of the view. We want to assign this logic via XAML in the View.
How can we do that?
Thanks for your help.
Kind regards
we have a RadMenu that has bound his data over a ViewModel. Depending on the data we want to generate RadMenuGroupItems or RadMenuItems.
The bound data class is this:
public class MenuItem
{
public List<MenuItem> SubItems { get; set; }
public string Text { get; set; }
public Type EditUserControlType { get; set; }
public Action<object> Navigate;
public int RowIndex { get; set; }
public int ColumnIndex { get; set; }
public MenuItem()
{
SubItems = new List<MenuItem>();
}
}
if the MenuItem has SubItems we want that a RadMenuGroupItem is dynamically created. If the MenuItem has no SubItems we want that a RadMenuItem is created.
Is there a similar way of Item Creation like the dynamic assignemnt of Styles over the property "ItemContainerStyleSelector". We need something called "ItemContainerControlSelector"
but we didn't find anything in the documentation.
Important: We don't want to create the items dynamicalle in code behind of the view. We want to assign this logic via XAML in the View.
How can we do that?
Thanks for your help.
Kind regards