Hello,
my problem is that the custom command I bound to the MenuTool surrounding a GalleryTool isn't executed. The CommandBindings are set correctly, because the same thing with an MenuTool containing Buttons works quite fine.
galleryMenu.Command = ChangeSkinCommand;galleryMenu.ShouldDisplayGalleryPreview = true;galleryMenu.ButtonType = MenuToolButtonType.Segmented;
Then I bound to the selectedItem ... to retrieve the correct command parameter:
Binding selectionBinding = new Binding("SelectedItem.Key");selectionBinding.Source = gallery;galleryMenu.SetBinding(MenuTool.CommandParameterProperty, selectionBinding);
This all works fine. The menu has the correct value as command parameter, but still it's not executed. What did I wrong?
Stef
The gallery preview items within the header of the menu tool have no relation to the menu tool's command so they would not be firing the command. You may want to submit a suggestion for adding ICommandSource support to the GalleryItem(Presenter) so a gallery item could be associated with a command. For now, you would need to handle the ItemClicked of the GalleryTool and execute the command via code.