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)); }
public override async Task OnInitializing() { await base.OnInitializing(); Text = "Back"; Tapped.Handle(() => buttonTapped.Raise()); }
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); }
public override async Task OnInitializing() { await base.OnInitializing(); Tapped.Handle(HandleSegmentTap); }