Ejemplo n.º 1
0
        /// <summary>
        /// Design-time only
        /// </summary>
        public MeetupPage()
        {
            this.InitializeComponent();

            var meetupModel = MeetupService.Meetups.First();

            this.BindingContext = this.meetupViewModel = new MeetupViewModel(this.Navigation, meetupModel);

            this.UpdatePage();

            // this.ToolbarItems.Add(this.filterItem);
            this.ListViewTalks.ItemSelected += async(sender, e) =>
            {
                if (!(this.ListViewTalks.SelectedItem is TalkModel session))
                {
                    return;
                }

                var sessionDetails = new TalkPage(session);

                await NavigationService.PushAsync(this.Navigation, sessionDetails);

                this.ListViewTalks.SelectedItem = null;
            };
        }
Ejemplo n.º 2
0
        private async void OnSeeAlsoTalkSelected(object sender, SelectedItemChangedEventArgs e)
        {
            if (!(this.ListViewSeeAlsoTalks.SelectedItem is TalkModel talk))
            {
                return;
            }

            var sessionDetails = new TalkPage(talk);

            await NavigationService.PushAsync(this.Navigation, sessionDetails);

            this.ListViewSeeAlsoTalks.SelectedItem = null;
        }
Ejemplo n.º 3
0
        public MeetupPage(MeetupModel meetup = null)
        {
            this.InitializeComponent();

            var venue = VenueService.Venues.Single(x => x.Id == meetup.VenueID);

            this.BindingContext = this.meetupViewModel = new MeetupViewModel(this.Navigation, meetup, venue);

            // this.filterItem = new ToolbarItem { Text = "Filter" };

            // if (Device.RuntimePlatform != Device.iOS)
            // {
            // this.filterItem.Icon = "toolbar_filter.png";
            // }

            // this.filterItem.Command = new Command(
            // async () =>
            // {
            // if (this.meetupViewModel.IsBusy) return;
            // await NavigationService.PushModalAsync(
            // this.Navigation,
            // new EvolveNavigationPage(new FilterSessionsPage()));
            // });

            // this.ToolbarItems.Add(this.filterItem);
            this.ListViewTalks.ItemSelected += async(sender, e) =>
            {
                if (!(this.ListViewTalks.SelectedItem is TalkModel session))
                {
                    return;
                }

                var sessionDetails = new TalkPage(session);

                await NavigationService.PushAsync(this.Navigation, sessionDetails);

                this.ListViewTalks.SelectedItem = null;
            };
        }