Språk

CheckBoxPreference.Checked Property

Definition

Caution

Use the AndroidX Preference Library for consistent behavior across all devices.

Returns the checked state. -or- Sets the checked state and saves it when it changes or is set for the first time, if persistence is enabled and a preference manager and key are available. It uses the configured PreferenceDataStore or, if none is configured, SharedPreferences.

[System.Obsolete("Use the AndroidX Preference Library for consistent behavior across all devices.")]
public override bool Checked { [Android.Runtime.Register("isChecked", "()Z", "GetIsCheckedHandler")] get; [Android.Runtime.Register("setChecked", "(Z)V", "GetSetChecked_ZHandler")] set; }
[<System.Obsolete("Use the AndroidX Preference Library for consistent behavior across all devices.")>]
[<get: Android.Runtime.Register("isChecked", "()Z", "GetIsCheckedHandler")>]
[<set: Android.Runtime.Register("setChecked", "(Z)V", "GetSetChecked_ZHandler")>]
member this.Checked : bool with get, set

Property Value

The checked state.

Attributes

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to