1

i have some problems with commands. For example. I have Workspace with a menu. In menu I importing IMenuItem whitch contain ICommand. So to make it work i have to create a CommandBinding in my Workspace.

Now, to import some DataTemplate i'm exporting ResourceDictionary and merging it with App.Resources, so it's not very good at all, but it's even not applicable for DataBindings.

I want to use CommandManager but i don't know how to, I can't find any example.

Also i want to ask is there any way to export not class, but export a values for existing class, I do not mean MetaData. Cause for each ICommand, IMenuItem etc i have to declare new class

[Export(typeof(RoutedUICommand)]
class MyNewCommand : RoutedUICommand
{

    public MyNewCommand()
    {
        //...
    }
}
Towelie
  • 99
  • 2
  • 10

0 Answers0