PickerBox (Validation)

A picker nullable validate


Picker easy to validate, you can load data with MVVM Observablecollection or Simple list of an object.



Example



This example shows the MVVM binding syntax. {Binding .} is the BindingContext with a list of objects, you can use ValueField and TextField to load items with text and value.
You can enter a Label to show errors in field validation, which automatically changes text, border and background color when there is an error facilitating interaction with the user.
To see better download the example.
Tag:
<lv:PickerBox x:Name="radioMVVMTAndListType" ValueField="ID" TextField="Product" ListItems="{Binding .}" Title="Select" CanEmpty="False" Padding="2" />


This example shows how to fill in the data via xaml.
Tag:
<lv:PickerBox x:Name="radioItemsType" ValueField="ID" TextField="Product" CanEmpty="False" ChangeMessageLabel="True" OnChangeSelected="radioItemsType_OnChangeSelected" Title="Select" Padding="2" />
     <lv:PickerItem Value="7" Text="Senven" />
     <lv:PickerItem Value="40" Text="Forty" />
     <lv:PickerItem Value="280" Text="Two Hundred and Eighty" />
<lv:RadioButton/>

File .cs event:
private void radioXAMLType_OnChangeSelected(object sender, EventArgs e)
{
   PickerBox pickerBox = (PickerBox)sender;
   DisplayAlert(pickerBox.TextSelected, pickerBox.ValueSelected, "OK");
}

Download

Documentation



Available in pdf

Documentaion download