public MainPageViewModel(INavigationService navigationService)
        {
            _navigationService = navigationService;

            Picker1Source.Add("A");
            Picker1Source.Add("B");
            Picker1Source.Add("C");

            Picker1Command = new DelegateCommand(() =>
            {
                Label1 = $"Picke1 = {Picker1SelectedItem}";
                Label2 = "";

                Picker2Source.Clear();
                for (int i = 0; i < 20; i++)
                {
                    Picker2Source.Add($"{Picker1SelectedItem} {i}");
                }
            });

            Picker2Command = new DelegateCommand(() =>
            {
                Label2 = $"Picke2 = {Picker2SelectedItem}";
            });
        }
Example #2
0
 void OnPicker1SelectedItemChanged()
 {
     try
     {
         if (Picker1SelectedItem != null)
         {
             var temp = GenPicker2(Picker1SelectedItem);
             Picker2Source.Clear();
             foreach (var item in temp)
             {
                 Picker2Source.Add(item);
             }
         }
     }
     catch { }
 }