Check
Warning
Check is obsolete as of version 1.5.0.
Please use Xamarin.Forms.CheckBox
or Xamarin.Forms.Switch
instead.
- Check →
Xamarin.Forms.CheckBox
orXamarin.Forms.Switch
- DisplayStyle →
Xamarin.Forms.Switch.Style
+Xamarin.Forms.SwitchStyle
(TizenSpecific) - Color →
Xamarin.Forms.Switch.OnColor
,Xamarin.Forms.Switch.ThumbColor
,Xamarin.Forms.Switch.BackgroundColor
- DisplayStyle →
Check
provides Tizen Wearable specific CheckBox widget. Check accepts user input by the method of toggling.
Check
derives from Xamarin.Forms.Switch.
Create Check
You can easily add Check
control with C# or XAML file. Tizen wearable device supports 3 styles of DisplayStyle
(Default
, Onoff
, Small
).
Each shape of DisplayStyle depends on the device model. You can set the default value of check with IsToggled
property. True
value set Check
selected. False
value set Check
unselected. Toggled
event is raised when Check
is toggled. You must add code for handling Toggled
event.
For more information, see the following links:
C# file
var check = new Check
{
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
DisplayStyle = "Onoff"
}
check.Toggled += (s, e) => {
Console.WriteLine("Check is now {0}", e.Value);
}
XAML file
Refer to TCCheck code at the test\WearableUIGallery\WearableUIGallery\TC\TCCeck.xaml
<StackLayout Orientation="Vertical">
<Label HorizontalOptions="CenterAndExpand" Text="Default" />
<w:Check
DisplayStyle="Default"
HorizontalOptions="CenterAndExpand"
IsToggled="False"
Toggled="OnToggledDefault" />
<Label HorizontalOptions="CenterAndExpand" Text="Onoff" />
<w:Check
DisplayStyle="Onoff"
HorizontalOptions="FillAndExpand"
IsToggled="True"
Toggled="OnToggledOnOff" />
<Label HorizontalOptions="CenterAndExpand" Text="Small" />
<w:Check
DisplayStyle="Small"
HorizontalOptions="CenterAndExpand"
IsToggled="False"
Toggled="OnToggledSmall" />
</StackLayout>