Splitbutton with dynamic menu in QAT

Ribbon for WPF Forum

Posted 15 years ago by Magnus Eklof
Version: 9.1.0500
I am struggling to have a splitbutton in the QAT that has a dynamic menu in it, I have tried two approaches:

1. Bind the ItemsSource on the Menu to a list of Commands (and using a datatemplate to add buttons for each command). The list of commands changes depending on what our GUI is showing.

2. Use the PopupOpening event on the SplitButton to dynamically populate the Menu (using the same list of commands) when you open it.

My problem is that when you remove and add this type of splitbutton from and to the QAT it seems that a clone of the button and the menu is made and after that the binding in attempt 1 stops working and also the eventhandler in attempt 2 stops working.

Any idea to work around this problem?


Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Magnus,

Check out the "Customizing the QAT" documentation topic. It talks about some routed events that bubble up when clones are made like CloneService.CloneCreatedEvent. In that you can reattach appropriate bindings, event handlers, etc.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.