
Hello,
Thank you for evaluating our Bars for Avalonia library. All of the Bars controls can work with either XAML definitions or MVVM. I'll focus on MVVM for the rest of the response since you mentioned data binding. Our MVVM design, once some initial configuration is in place, makes it very simple to manage large applications completely through viewmodels.
It would be helpful to know more about your intended usage scenario. Such as are you building an entire ribbon or just making a standalone popup button here outside of a ribbon?
For BarPopupButton specifically, it is an ItemsControl that has a popup menu and the "containers" generated for each viewmodel item is a BarMenuItem by default. However other child menu controls like separators and menu galleries can also be generated for viewmodel items.
The process for all this is described in the MVVM Support documentation topic. Whereas a lot of ItemsControls expect to create a single "container" type for their items, and have an ItemTemplate that lets you select the "content" for a generated "container" controls, we go with a different more powerful concept called item container template selectors that is described in that topic. Item container template selectors let you choose what child control should be used as a "container" for each ItemsControl's viewmodel item. It's a mechanism that requires a little bit of initial setup but once done, you can populate an entire ribbon or toolbar hierarchy easily through viewmodels.
Our Bars MVVM Library that is heavily used in our samples shows an implementation of this concept. You can use that directly or use your own viewmodels with similar concepts instead. That library has an exhaustive viewmodel implementation for all control types supported by Bars. You can see it fully demoed in our main Bars Document Editor (MVVM) demo, where the entire ribbon UI control hierarchy is built from a hierarchy of simple viewmodels of types from that library.
Populating the items of a popup button with that library would involve use of the item container template selector and using a collection of BarButtonViewModel, BarSeparatorViewModel, etc. instances.
As mentioned above, you can use your own viewmodels instead of ours if you wish. You'd just need to configure a custom item container template selector (like our MVVM Library's BarControlTemplateSelector class) and set up the DataTemplates (like this for BarButtonViewModel) that selector would use to bind your viewmodels to UI controls used as containers.
Before you get into making a custom MVVM Library kind of implementation though, it's probably best to look at our samples and even try using our prebuilt MVVM Library to test concepts out first.