Hi Alexey,
You can mix RadSeparator instances with your objects. For example I created a menu:
<nav:RadMenu> |
<nav:RadMenuItem Header="File" x:Name="file" /> |
<nav:RadMenuItem Header="Edit" /> |
</nav:RadMenu> |
and then added an ItemsSource:
file.ItemsSource = Enumerable.Range(1, 11).Select<int,object>(num => |
{ |
if (num % 3 == 0) |
{ |
return new RadSeparator(); |
} |
else |
{ |
return String.Format("Item {0}", num); |
} |
}); |
This is just a quick test, but it should work like that if you are using HierarchicalDataTemplates and have a more complex structure.
I realize the RadSeparator objects cannot be easily serialized and they have to mix with data objects, but you can replace them easily just before setting the ItemsSouce and have placeholder data objects for them.
Please come back to us if you need more help or there are any issues.
Kind regards,
Miroslav
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.