ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TrayButton Class / IsChecked Property

In This Topic
    IsChecked Property (TrayButton)
    In This Topic
    Gets or sets whether or not this TrayButton is Checked.
    Syntax
    public bool IsChecked {get; set;}
    Public Property IsChecked As Boolean

    Property Value

    True if the toggle button is checked, false otherwise.
    Remarks

    Only available if ButtonType is either TrayButtonType.ToggleButton or TrayButtonType.PopupToggleButton

    The underlying UI ToggleButton has its Checked state bound to IsChecked.

    When overridden code or the UI button changes the value of IsChecked, then OnButtonChecked will be invoked.

    Normally the UI changes the value of IsChecked, and you can set some corresponding external state within the OnButtonChecked callback.

    When changes occur within the corresponding external state, you may want to update the UI Button's appearance only, using SetCheckedNoCallback instead of directly setting IsChecked.

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also