Checkbox and RadioButon in xamarin forms
Step 1:
Install the following plugin :
Xamarin.Forms.InputKit
Step 2 :
Add this line in page deceleration:
xmlns:input="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"
Step 3 :
<input:CheckBox Text="Option 1" Type="Box" />
<input:CheckBox Text="Hello World I'm Option 2" Type="Check"/>
<input:CheckBox Text="Consetetur eum kasd eos dolore Option 3" Type="Cross"/>
<input:CheckBox Text="Sea sed justo" Type="Star"/>
Result :
** checkbox have the following properties :
Install the following plugin :
Xamarin.Forms.InputKit
Step 2 :
Add this line in page deceleration:
xmlns:input="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"
Step 3 :
1 . CheckBox
you can use checkbox like that :<input:CheckBox Text="Option 1" Type="Box" />
<input:CheckBox Text="Hello World I'm Option 2" Type="Check"/>
<input:CheckBox Text="Consetetur eum kasd eos dolore Option 3" Type="Cross"/>
<input:CheckBox Text="Sea sed justo" Type="Star"/>
Result :
** checkbox have the following properties :
- CheckChanged: (Event) Invokes when check changed.
- CheckChangedCommand: (Command) Bindable Command, executed when check changed.
- Key: (int) A key you can set to define checkboxes as ID.
- Text: (string) Text to display description
- IsChecked: (bool) Checkbox checked situation. Works TwoWay Binding as default.
- Color: (Color) Color of selected check.
- TextColor: (Color) Color of description text.
- Type: (CheckType) Type of checkbox checked style. (Check,Cross,Star,Box etc.)
2 . RadioButon :
Radio Buttons should use inside a RadioButtonGroupView. If you want this view will return you selected radio button. But you can handle it one by one too.
Example :
<input:RadioButtonGroupView>
<input:RadioButton Text="Option 1" />
<input:RadioButton Text="Option 2" />
<input:RadioButton Text="Option 3" />
<input:RadioButton Text="Option 4" />
</input:RadioButtonGroupView>
Result :
** RadioButton has the following properties :
RadioButtonGroupView
- SelectedIndex: (int) Gets or Sets selected radio button inside itself by index
- SelectedItem: (object) Gets or Sets selected radio button inside itself by Value
RadioButton
- Clicked: (event) Invokes when clikced
- ClickCommand: (int) Bindable Command, Executes when clicked
- Value: (object) A value keeps inside and groupview returns that value as SelectedItem
- IsChecked: (bool) Gets or Sets that radio button selected
- Text: (string) Text to display near of Radio Button
- FontSize: (double) Fontsize of Text
- Color: (Color) Color of selected radio button dot
- TextColor: (Color) Color of Text
Comments
Post a Comment