Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 2.42 KB

README.md

File metadata and controls

64 lines (49 loc) · 2.42 KB

Zebble.CheckBox

logo

Very simple checkbox object for Zebble applications. It uses an image for the checked effect.

NuGet

A CheckBox is a Zebble plugin that you can set the image to be different from a tick, or define the appearance of it however you need in the Styles.


Setup


Api Usage

Basic usage:

<CheckBox Id="MyCheckBox1"  Checked="false" ></CheckBox>
<CheckBox Id="MyCheckBox2"  Checked="true" ></CheckBox>
new CheckBox { Id = "MyCheckBox1", Checked = true };
new CheckBox { Id = "MyCheckBox2", Checked = false};

Checked

You can set the value of CheckBox by changing Checked property. The default value is false.

Checked image:

You can use CheckedImage field to set an image for the checked state, like the following:

MyCheckBox.CheckedImage = new ImageView { Path = "Images/Something.png" };

Checked changed:

The main event for a CheckBox is CheckedChanged. In this method you should define what you want to do when user checks/unchecks the CheckBox control.

MyCheckBox.CheckedChanged += CheckedChange;
void CheckedChange() { /* Do something here */ }

Properties

Property Type Android iOS Windows
CheckedImage View x x x
Path string x x x
Checked bool x x x

Events

Event Type Android iOS Windows
CheckedChanged AsyncEvent x x x

Methods

Method Return Type Parameters Android iOS Windows
ToggleChanged Task - x x x