How to make Toggle button in ribbon

Ribbon for WPF Forum

Posted 15 years ago by Raghuraj
Version: 4.5.0477
Avatar
Hi,

I am using the ribbon control.

I am not able make the ribbon button to behave like Toggle Button.

how can i achieve this.

please reply



thanks

Raghuraj

Comments (1)

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

Buttons in the Ribbon are intended to be used with the WPF command model. The reason is that they can be cloned and put in the QAT, etc. So by using the command model to maintain their states, you can ensure each instance is updated.

Anyhow, look in our main Ribbon demo in the Sample Browser. The Toggle Strikethrough button is a good example. In RichTextBoxExtended.cs, search for "ToggleStrikethrough" and you can see the code needed to maintain the checked state of that toggle button and also how clicking it can execute an action.

The Ribbon documentation also has a topic "Interaction with Checkable Controls" that would be useful for you.


Actipro Software Support

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.