How to click the ribbon popup button from coding?

Ribbon for WPF Forum

Posted 10 years ago by Roger Rong
Version: 13.2.0590
Avatar

Hi there,

We use a ribbon popupbutton in our applications and a user control is didsplayed when users clicking the button, which works perfectly.

        private void PopupButton_PopupOpening(object sender, ActiproSoftware.Windows.CancelRoutedEventArgs e)
        {
            PopupButton popupOwner = (PopupButton)sender;
            popupOwner.PopupContent = UCWorkCode.CurrentWorkCodeUserControl;

            
        }

 Now we need to popup the user control from coding. Anyway to archieve that? We tried the sendkey with no luck.

 

Thanks in advance.

Roger

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Roger,

I believe you could just set the PopupButton.IsPopupOpen property to true.


Actipro Software Support

Posted 10 years ago by Roger Rong
Avatar

Thanks. It does work. Just as simple as that. :)

 

Roger

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.