Exemplo n.º 1
0
 Task HandleTapped()
 {
     Selected = true;
     if (UseNavForward)
     {
         return(Nav.Forward <TPage>(navParams: NavParams, transition: Transition));
     }
     return(Nav.Go <TPage>(navParams: NavParams, transition: Transition));
 }
Exemplo n.º 2
0
        async Task InitializeComponents()
        {
            CssClass = "standard-list";

            await Page.GetNavBar().AddButton(ButtonLocation.Right, AddButton = new ImageView
            {
                Id       = "AddButton",
                CssClass = "navbar-button",
                Path     = "Images/Icons/White-Add.png"
            }
                                             .On(x => x.Tapped, () =>
            {
                try { return(Nav.Forward <Pages.Page1Enter>()); }
                catch (Exception ex) { return(Alert.Show(ex.Message)); }
            }
                                                 ));

            await Add(HeaderTitle = new TextView
            {
                Id       = "HeaderTitle",
                Text     = "Contacts",
                CssClass = "module-header-title"
            }
                      );

            await Add(HeaderIntro = new TextView
            {
                Id       = "HeaderIntro",
                Text     = "This module allows you to see all your contacts, interact with them and generally have a lot of fun with it. Am I long enough now?",
                CssClass = "header-intro"
            }
                      );

            await Add(ButtonsContainer = new Stack
            {
                Id        = "ButtonsContainer",
                Direction = RepeatDirection.Horizontal,
                CssClass  = "top-buttons-row"
            }
                      );

            await ButtonsContainer.Add(ReloadButton = new Button { Id = "ReloadButton", Text = "Reload" }
                                       .On(x => x.Tapped, ReloadButtonTapped));

            await Add(List = new ListView <Contact, Row>
            {
                Id         = "List",
                LazyLoad   = true,
                EmptyText  = "Empty list",
                DataSource = Items,
            }
                      );
        }
 public Task RowTapped()
 {
     Nav.Forward <CustomRide>(new { Id = Item.Id });
     return(Task.CompletedTask);
 }
Exemplo n.º 4
0
 public async Task ViewButtonTapped() => await Nav.Forward <Pages.Page1Enter>(new { Item = Item });