-
Notifications
You must be signed in to change notification settings - Fork 100
CheckBox
<input:CheckBox Text="Option 1" Type="Box" IsChecked="True" />
<input:CheckBox Text="Option 1" Type="Check" IsChecked="True" />
<input:CheckBox Text="Option 1" Type="Cross" IsChecked="True" />
<input:CheckBox Text="Option 1" Type="Star" IsChecked="True" />
There are 4 Types for CheckBox. Box is default Type.
<input:CheckBox Text="Consetetur eum kasd eos" IsChecked="False" />
<input:CheckBox Text="Hello World I'm Option 2" IsChecked="True" />
Binding: This have Two-Way Binding also.
<input:CheckBox Text="Hello World I'm Option 2" IsChecked="{Binding YourProperty}" />
You can set it from your ViewModel or it'll change your ViewModel's property when user checked.
<input:CheckBox Text="Hello I'm Option 1" Key="1" />
<input:CheckBox Text="Hello I'm Option 2" Key="2" />
Key just a **Int32 **value to keep inside of CheckBox, You can keep Id or something else inside it.
Binding: This have Two-Way Binding also.
<input:CheckBox Text="I'm Option 1" Key="{Binding YourFirstProperty}" />
<input:CheckBox Text="I'm Option 2" Key="{Binding YourSecondProperty}" />
This property is One-Way Binding property.It can't be changed at runtime by user. This is only have Source to View Binding.
<input:CheckBox BoxBackgroundColor="Aqua" IsChecked="True" Text="Option 1"/>
Allows to change box's background of CheckBox
Binding: This have One-Way Binding also.
<input:CheckBox BoxBackgroundColor="{Binding YourColor}" IsChecked="True" Text="Option 1"/>
<!-- OR -->
<!--YOU CAN USE DYNAMICRESOURCE FROM APP.XAML-->
<input:CheckBox BoxBackgroundColor="{DynamicResource YourColor}" IsChecked="True" Text="Option 1"/>
<input:CheckBox Color="Blue" IsChecked="True" Text="Option 2"/>
Allows to change Checked icon color of CheckBox
Binding: This have One-Way Binding also.
<input:CheckBox Color="{Binding YourColor}" IsChecked="True" Text="Option 2"/>
<!-- OR -->
<!--YOU CAN USE DYNAMICRESOURCE FROM APP.XAML-->
<input:CheckBox Color="{DynamicResource YourColor}" IsChecked="True" Text="Option 2"/>
<input:CheckBox TextColor="Purple" Text="Option"/>
Binding: This have One-Way Binding also.
<input:CheckBox TextColor="{Binding YourColor}" Text="Option"/>
<!-- OR -->
<!--YOU CAN USE DYNAMICRESOURCE FROM APP.XAML-->
<input:CheckBox TextColor="{DynamicResource YourColor}" Text="Option"/>
<input:CheckBox TextFontSize="30" Text="Option" />
Binding: This have One-Way Binding also.
<input:CheckBox TextFontSize="{Binding YourSize}" Text="Option"/>
<input:CheckBox BoxSizeRequest="100" Text="Option"/>
Binding: This have One-Way Binding also.
<input:CheckBox BoxSizeRequest="{Binding YourSize}" Text="Option"/>
<input:CheckBox IsDisabled="true" Text="Option 1"/>
<input:CheckBox IsDisabled="true" Text="Option 1" IsChecked="True"/>
Disables the checkbox. Opacity will be 0.6 and user can not interact with it.
Binding: This have One-Way Binding also.
<input:CheckBox IsDisabled="{Binding YourBooleanProperty}" Text="Option 1"/>