Skip to main content

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.1.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