-
Notifications
You must be signed in to change notification settings - Fork 12
Checkbox
Hussain N. Abbasi edited this page Nov 16, 2018
·
3 revisions
iOS | Android | UWP |
---|---|---|
IntelliAbb.Xamarin.Controls.Checkbox
extends Xamarin.Forms.ContentView and has the following additional bindable properties and events,
Property | Description |
---|---|
Design | Sets the checkbox design as Design.Unified or Design.Native view. (shown above) |
CheckColor |
Xamarin.Forms.Color of the check-mark |
FillColor | Fill Xamarin.Forms.Color when checked |
IsChecked | Checked state of the check-mark as bool
|
OutlineColor | Outline Xamarin.Forms.Color of the check-mark |
OutlineWidth | Outline and check-mark width as float
|
Shape | Shape of the check-mark. Shape.Circle or Shape.Rectangle
|
Style |
Xamarin.Forms.Style that can be set via resource |
Event | Description |
---|---|
IsCheckedChanged | Raised when IsChecked is changed with TappedEventArgs args. |
Bring in the namespace,
xmlns:ia="clr-namespace:IntelliAbb.Xamarin.Controls;assembly=IntelliAbb.Xamarin.Controls"
use the control,
<!-- Unified Design -->
<ia:Checkbox x:Name="AwesomeCheckbox"
OutlineColor="Blue"
FillColor="Blue"
CheckColor="White"
Shape="Rectangle"
IsCheckedChanged="Handle_IsCheckedChanged" />
<!-- Native Design -->
<ia:Checkbox x:Name="NativeCheckbox"
Design="Native"
IsCheckedChanged="Handle_IsCheckedChanged" />
// Unified design
var checkbox = new Checkbox {
OutlineColor=Color.Purple,
FillColor=Color.Purple,
CheckColor=Color.White,
Shape=Shape.Rectangle //default is Circle
};
// Native design
var checkbox = new Checkbox {
OutlineColor=Color.Purple,
FillColor=Color.Purple,
CheckColor=Color.White,
Design=Design.Native
};
XamarinControls by intelliAbb