Skip to main content

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

AlertButton.SetDown(Boolean) Method

Emulates changing a button’s check state, as if the button were clicked by the mouse.

Namespace: DevExpress.XtraBars.Alerter

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public void SetDown(
    bool down
)

#Parameters

Name Type Description
down Boolean

true to check the button; false to uncheck the button.

#Remarks

The SetDown method is in effect for buttons with the AlertButton.Style property set to AlertButtonStyle.CheckButton. This method fires the AlertControl.ButtonClick event, and then sets the AlertButton.Down property to the specified value.

#Example

The following example shows how to pin an alert window when it’s displayed. The AlertControl.FormLoad event is handled to perform window customization. To pin the window, the AlertButton.SetDown method is called for the AlertButtonCollection.PinButton.

using DevExpress.XtraBars.Alerter;

private void alertControl1_FormLoad(object sender, AlertFormLoadEventArgs e) {
    e.Buttons.PinButton.SetDown(true);
}
See Also