private async void TapGestureRecognizer_Tapped(object sender, EventArgs e) { try { if (!CrossConnectivity.Current.IsConnected) { return; } if (sender is StackLayout) { // lstCurrentItems.BeginRefresh(); var menuItem = ((StackLayout)sender); if (menuItem != null && menuItem.BindingContext != null) { MyWorkItem item = ((MyWorkItem)menuItem.BindingContext); await Navigation.PushAsync(new MyWorkPage(item.Id, "All", item.Title)); } } } catch (Exception ex) { } }
public NewItemPage() { NavigationPage.SetBackButtonTitle(this, ""); InitializeComponent(); Item = new MyWorkItem { Title = "Item name", Line3 = "This is an item description." }; BindingContext = this; }