コード例 #1
0
        private void AllVillagersTapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            VillagersViewModel villagerViewModel = new VillagersViewModel();

            _villagerPage         = new VillagersPage();
            _villagerPage.Content = new VillagersContentView(villagerViewModel);

            Navigation.PushModalAsync(_villagerPage);
        }
コード例 #2
0
        private void ResidentsTapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            string             filter            = "and IsResident <> 0";
            VillagersViewModel villagerViewModel = new VillagersViewModel(filter);

            _villagerPage         = new VillagersPage();
            _villagerPage.Content = new VillagersContentView(villagerViewModel);

            Navigation.PushModalAsync(_villagerPage);
        }
コード例 #3
0
        private void VillagerSpeciesTapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            Frame frame        = (Frame)sender;
            Grid  frameGrid    = (Grid)frame.Children[0];
            Label speciesLabel = (Label)frameGrid.Children[1];

            string filter = "and Species = '" + speciesLabel.Text + "'";

            VillagersViewModel villagerViewModel = new VillagersViewModel(filter);

            _villagerPage         = new VillagersPage();
            _villagerPage.Content = new VillagersContentView(villagerViewModel);

            Navigation.PushModalAsync(_villagerPage);
        }