I am not sure if I understand your scenario well. That's why I will highly appreciate it if you can provide us with a sample project with your implementation. This will allow us to understand your scenario better and assist you further.
Can you also elaborate on why you don't want to define the commands in XAML. I would generally recommend that you bind the RadRibbonButtons Command
property to a business command. You should do that in the DataTemplates
that define RadRibbonButtons
. This would however mean that you need to make sure that the business commands in all your child models have the same name. Another approach you can use is to define an ItemTemplateSelector
to choose a different DataTemplates
with different RibbonButton
definitions for the different object types. This would allow you to bind the buttons created to wrap the view models to different commands.
DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!