예제 #1
0
            async Task InitializeComponents()
            {
                AutoFlash = true;

                Tapped.Handle(ViewButtonTapped);

                await Add(PhotoImage = new ImageView { Id = "PhotoImage", CssClass = "icon", Path = Item.Photo.Path }
                          .Set(x => x.Style.Visible = (Module.ShowPhotoColumn && Item.Photo.HasValue()))
                          .Set(x => x.Style.Ignored = !(Module.ShowPhotoColumn)));

                await Add(NameColumn = new Stack { Id = "NameColumn" });

                await NameColumn.Add(Name = new TextView { Id = "Name", CssClass = "title", Text = Item.Name });

                await NameColumn.Add(ContactDetails = new TextView
                {
                    Id   = "ContactDetails",
                    Text = (new[] { Item.Email, Item.Tel }.Trim().ToString(", "))
                }
                                     );

                await Add(ViewButton = new ImageView
                {
                    Id        = "ViewButton",
                    CssClass  = "view-row",
                    Path      = "Images/Icons/Arrow-Right.png",
                    AutoFlash = true
                }

                          .On(x => x.Tapped, ViewButtonTapped));

                await SlideIn.Add(DeleteButton = new Button { Id = "DeleteButton", Text = "Delete", CssClass = "delete-button" }
                                  .On(x => x.Tapped, DeleteButtonTapped));
            }
예제 #2
0
            public override async Task OnInitializing()
            {
                await base.OnInitializing();

                Text = "Back";
                Tapped.Handle(() => buttonTapped.Raise());
            }
예제 #3
0
        public Slider()
        {
            Id = "Slider";

            Handles.Do(x => x.Css.Size(0)); // Without this the sizing goes wrong.

            ActiveHandle = Handle;

            Tapped.Handle(UserTapped);
            PanFinished.Handle(() => UserTapped(LastPanEnd));
            Panning.Handle(OnPanning);
        }
예제 #4
0
        public override async Task OnInitializing()
        {
            await base.OnInitializing();

            Tapped.Handle(HandleSegmentTap);
        }