Class SfCheckBox
Represents the check box control
Inheritance
Namespace: Syncfusion.Android.Buttons
Assembly: Syncfusion.Buttons.Android.dll
Syntax
public class SfCheckBox : CompoundButton
Constructors
SfCheckBox(Context)
Initializes a new instance of the SfCheckBox class
Declaration
public SfCheckBox(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | the application context |
SfCheckBox(Context, IAttributeSet)
Initializes a new instance of the SfCheckBox class
Declaration
public SfCheckBox(Context context, IAttributeSet attributes)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | the application context |
Android.Util.IAttributeSet | attributes | the attributes |
SfCheckBox(Context, IAttributeSet, Int32)
Initializes a new instance of the SfCheckBox class
Declaration
public SfCheckBox(Context context, IAttributeSet attributes, int style)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | the application context |
Android.Util.IAttributeSet | attributes | the attributes |
System.Int32 | style | the default style |
SfCheckBox(Context, IAttributeSet, Int32, Int32)
Initializes a new instance of the SfCheckBox class
Declaration
public SfCheckBox(Context context, IAttributeSet attributes, int styleAttribute, int style)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | the application context |
Android.Util.IAttributeSet | attributes | the attributes |
System.Int32 | styleAttribute | the default style attribute |
System.Int32 | style | the default style |
SfCheckBox(IntPtr, JniHandleOwnership)
Initializes a new instance of the SfCheckBox class
Declaration
protected SfCheckBox(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | javaReference | java reference |
Android.Runtime.JniHandleOwnership | transfer | The runtime ownership |
Properties
BorderWidth
Gets or sets the borderwidth of the checkbox
Declaration
public float BorderWidth { get; set; }
Property Value
Type |
---|
System.Single |
Checked
Gets or sets a value indicating whether control is checked or not.
Declaration
public Nullable<bool> Checked { get; set; }
Property Value
Type |
---|
System.Nullable<System.Boolean> |
CornerRadius
Gets or sets a corner radius of the control
Declaration
public float CornerRadius { get; set; }
Property Value
Type |
---|
System.Single |
IsThreeState
Gets or sets a value indicating whether control is three stated.
Declaration
public bool IsThreeState { get; set; }
Property Value
Type |
---|
System.Boolean |
LineBreakMode
Gets or sets a LineBreakMode of the text
Declaration
public LineBreakMode LineBreakMode { get; set; }
Property Value
Type |
---|
LineBreakMode |
PaddingLeft
Get the left padding value.
Declaration
public override int PaddingLeft { get; }
Property Value
Type |
---|
System.Int32 |
PaddingRight
Get the right padding value.
Declaration
public override int PaddingRight { get; }
Property Value
Type |
---|
System.Int32 |
TickColor
Gets or sets the tickcolor of the checkbox
Declaration
public Color TickColor { get; set; }
Property Value
Type |
---|
Android.Graphics.Color |
Methods
Dispose(Boolean)
Dispose the objects
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
OnCreateDrawableState(Int32)
Generate new drawable state
Declaration
protected override int[] OnCreateDrawableState(int extraSpace)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | extraSpace | the extra space |
Returns
Type | Description |
---|---|
System.Int32[] | The state |
OnDraw(Canvas)
Method to draw the shapes.
Declaration
protected override void OnDraw(Canvas canvas)
Parameters
Type | Name | Description |
---|---|---|
Android.Graphics.Canvas | canvas | the canvas |
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Ons the layout.
Declaration
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | changed | If set to |
System.Int32 | left | Left. |
System.Int32 | top | Top. |
System.Int32 | right | Right. |
System.Int32 | bottom | Bottom. |
OnRestoreInstanceState(IParcelable)
Hook allowing a view to re-apply a representation of its internal state that had previously been generated by Android.Views.View.OnSaveInstanceState.
Declaration
public override void OnRestoreInstanceState(IParcelable state)
Parameters
Type | Name | Description |
---|---|---|
Android.OS.IParcelable | state | The frozen state that had previously been returned by Android.Widget.TextView.OnSaveInstanceState. |
OnSaveInstanceState()
Hook allowing a view to generate a representation of its internal state that can later be used to create a new instance with that same state.
Declaration
public override IParcelable OnSaveInstanceState()
Returns
Type | Description |
---|---|
Android.OS.IParcelable | parcel state |
SetBackgroundColor(Color)
Sets the background color for this view.
Declaration
public override void SetBackgroundColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
Android.Graphics.Color | color | the color of the background |
SetPadding(Int32, Int32, Int32, Int32)
Sets the padding
Declaration
public override void SetPadding(int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | the left |
System.Int32 | top | the top |
System.Int32 | right | the top |
System.Int32 | bottom | the bottom |
Events
StateChanged
Event handles when state changed
Declaration
public event EventHandler<StateChangedEventArgs> StateChanged
Event Type
Type |
---|
System.EventHandler<StateChangedEventArgs> |