locked
“Acropoliscommands” / “MenuItem” ? RRS feed

  • Question

  • Hi All,

     

    We are creating menu dynamically, looking for a way to bind Acropoliscommand to menuitem.  Intention is to execute this command on click of menuitem.

     

     

    MenuItem mi = new MenuItem();

    mi.Header = "MenuItem";

    Command =??

     

     

    Want to bind below command dynamically to above menuitem. or bind to any "ComponentCommand" defined in parts.

    "{Awx:AcropolisCommand AcropolisCommands.Exit}"

     

     

    Thanks

    Shine

     

     

     

     

     

    Wednesday, September 5, 2007 7:38 PM

All replies

  •  

     

     

    Disabled menu item after this command assign...

    MenuItem mi = new MenuItem();

    mi.Header = "MenuItem";

    mi.command = new Microsoft.Acropolis.Windows.WpfPartCommandProxy("AcropolisCommands.Exit");

     

     

    This doesn't work either...

     

    MenuItem mi = new MenuItem();

    mi.Header = "MenuItem";

    Binding binding = new Binding("AcropolisCommands.Exit");

    mi.SetBinding(MenuItem.CommandProperty, binding);

     

     

     

    I am missing something any help please?

    Thursday, September 6, 2007 10:25 PM