Unable to identify dropdown press event in splitbutton

Ribbon for WPF Forum

Posted 1 year ago by Surendra Mudragada
Version: 23.1.0

I have created a split button in my application, now creating triggers to change the background color of each of the buttons inside split button whenever user presses them.

I was able to successfully implement for the normal button on the left hand side but for the right hand side button i am not getting the IsPressed property set to true even on pressing it, 

could you please help

Comments (3)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA


IsPressed will only fire for the button portion of the ribbon:SplitButton control.  When the arrow part is pressed, the IsPopupOpen property will be set to true and the SplitButton.PopupCommand will execute.

Actipro Software Support

Posted 3 months ago by UI-UX

What about on Preview mouse down events. How will we distinguish!? 

[Modified 3 months ago]

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA

The classic Ribbon product's SplitButton has an element in its template with name "PART_Button".  If the mouse is over that element in the template, it is over the button part of the control.  If it is over the SplitButton but not over the "PART_Button" element, then it is over the drop-down button portion.  

The newer Bars product's BarSplitButton has a protected IsOverButtonArea method that you can pass a MouseEventArgs to and it will tell you if the mouse is over the button portion.

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.