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
        public void OnNavigatedTo(INavigationParameters parameters)
        {
            var temp = GenPicker1();

            Picker1Source.Clear();
            foreach (var item in temp)
            {
                Picker1Source.Add(item);
            }
        }