Files to look at:
- GalleryHelper.cs (VB: GalleryHelper.vb)
- MainWindow.xaml (VB: MainWindow.xaml)
- MainWindow.xaml.cs (VB: MainWindow.xaml)
- Person.cs (VB: Person.vb)
- PersonCollection.cs (VB: PersonCollection.vb)
- MainViewModel.cs (VB: MainViewModel.vb)
How to apply MVVM to the RibbonControl (the gallery collection binding)
In the v10.1 version, our galleries cannot be bound to any collection, and a gallery item itself does not provide a way to execute a command.
The gallery is a complex element, and it spends time to create these two new features (S35347 and Provide a way to apply a command for the GalleryBarItem ). As a solution, we suggest you use commands and add
gallery items manually via the commands. Handle the gallery item ItemClick to imitate the command functionality.