Android.Widget.Switch Class
A Switch is a two-state toggle switch widget that can select between two options.

See Also: Switch Members

Syntax

[Android.Runtime.Register("android/widget/Switch", DoNotGenerateAcw=true)]
public class Switch : CompoundButton

Remarks

A Switch is a two-state toggle switch widget that can select between two options. The user may drag the "thumb" back and forth to choose the selected option, or simply tap to toggle as if it were a checkbox. The TextView.TextFormatted property controls the text displayed in the label for the switch, whereas the Switch.TextOffFormatted and Switch.TextOnFormatted text controls the text on the thumb. Similarly, the TextView.SetTextAppearance(Android.Content.Context, System.Int32) and the related setTypeface() methods control the typeface and style of label text, whereas the Switch.SetSwitchTextAppearance(Android.Content.Context, System.Int32) and the related seSwitchTypeface() methods control that of the thumb.

See the Toggle Buttons guide.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 14