Select gallery item programmatically

Mar 14, 2012 at 5:00 PM
Edited Mar 14, 2012 at 5:01 PM

Is it possible to select a gallery item programmatically? I have a RibbonSplitButtonGallery which I populate with GalleryItemPropertySet objects using its ItemsSource property. When clicking on an item, the SelectedItem property gives me the correct 0-based item index, but assigning a value to SelectedItem seems to have no effect.

Mar 15, 2012 at 3:45 PM

Never mind. It works fine. The problem was me trying to assign a value to SelectedItem inside the RibbonSplitButtonGallery's ExecuteEvent when fired due to a change to SelectedItem. Apparently that's not possible.