Skip to content

Husseinhj/CountryPicker.UWP

Repository files navigation

CountryPicker.UWP Build status Nuget version downloads

Country picker control for Windows Universal App Support target UWP >= 10.0 Build 10240

To install CountryPicker for UWP, run the following command in the Package Manager Console

Install-Package CountryPicker.UWP

Download package

Release Notes v1.3.0 +New properties for customize picker +Add back button and event -fix bugs and improve preformance

Sample code :

var countryPickerDialog = new UWP.Class.PickerDialog()
{
    CountryName = BtnCountryPicker.Content.ToString(),
    SearchBoxPlaceHolder = "Search",
    Header = "Choose country",
    SearchBoxFlowDirection = FlowDirection.LeftToRight
};

countryPickerDialog.SelectedCountry += CountyPickerDialogOnSelectedCountry;
countryPickerDialog.Show();

// Event when country was selected by user
private void CountyPickerDialogOnSelectedCountry(object sender, CountryModel selected)
{
     LblCountryCode.Text = String.Format("+{0}", selected.Code);

     BtnCountryPicker.Content = selected.Name;

     ImgFlag.Source = new BitmapImage(new Uri(selected.Flag, UriKind.RelativeOrAbsolute));
}
                

Desktop version:

enter image description here

Mobile version:

enter image description here

Releases

No releases published

Packages

No packages published

Languages