Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarBaseButtonItem.Toggle() Method

In This Article

Toggles the button item’s state.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public virtual void Toggle()

#Remarks

If a button item’s BarBaseButtonItem.ButtonStyle property is set to BarButtonStyle.Check, it can have two states (pressed and elevated). The item’s state is determined by the Boolean BarBaseButtonItem.Down property. The Toggle method inverts the value of the BarBaseButtonItem.Down property and thus toggles the button item’s state.

A Toggle method call has no effect if the BarBaseButtonItem.ButtonStyle property isn’t set to BarButtonStyle.Check or if the button item is disabled (the BarItem.Enabled property is set to false).

See Also