public App() { //// The root page of your application //MainPage = new ContentPage { // Content = new StackLayout { // VerticalOptions = LayoutOptions.Center, // Children = { // new Label { // XAlign = TextAlignment.Center, // Text = "Welcome to Xamarin Forms!" // } // } // } //}; MainPage = new MainContentPage(); }
async void OnSaveButtonClicked(object sender, EventArgs args) { if (BindingContext != null) { ID = ((DataSource)BindingContext).ID; ImageFilename = ((DataSource)BindingContext).ImageFilename; DataSource.EditGlossaryTerm(ID, termEntry.Text, definitionEntry.Text, ImageFilename); } else { DataSource.AddGlossaryTerm(termEntry.Text, definitionEntry.Text, ImageFilename); } MainContentPage.RefreshListData(); await Navigation.PopModalAsync(true); }