Example #1
0
        public SesionesPage()
        {
            BindingContext = new EventoData();

            Title           = "Sesiones";
            Icon            = "tabsession.png";
            BackgroundImage = "background.png";

            StackLayout panel = new StackLayout
            {
                Spacing = 6,
            };

            ListView listaSesiones = new ListView();

            listaSesiones.SetBinding(ListView.ItemsSourceProperty, new Binding("Sessions", BindingMode.OneWay));
            listaSesiones.ItemTemplate = new DataTemplate(typeof(SessionCell));
            listaSesiones.RowHeight    = 64;

            listaSesiones.ItemSelected += (sender, e) =>
            {
                var item = (Session)e.SelectedItem;
                SessionDetailPage sessionPage = new SessionDetailPage();
                sessionPage.BindingContext = item;
                Navigation.PushAsync(sessionPage);
            };

            panel.Children.Add(listaSesiones);
            Content = panel;
        }
Example #2
0
        public SesionesPage()
        {
            BindingContext = new EventoData();

            Title = "Sesiones";
            Icon = "tabsession.png";
            BackgroundImage = "background.png";

            StackLayout panel = new StackLayout
            {
                Spacing = 6,
            };

            ListView listaSesiones = new ListView();
            listaSesiones.SetBinding(ListView.ItemsSourceProperty, new Binding("Sessions", BindingMode.OneWay));
            listaSesiones.ItemTemplate = new DataTemplate(typeof(SessionCell));
            listaSesiones.RowHeight = 64;

            listaSesiones.ItemSelected += (sender, e) =>
            {
                var item = (Session)e.SelectedItem;
                SessionDetailPage sessionPage = new SessionDetailPage();
                sessionPage.BindingContext = item;
                Navigation.PushAsync(sessionPage);
            };

            panel.Children.Add(listaSesiones);
            Content = panel;
        }