async void OnContentPopupTest1Clicked(object sender, EventArgs e) { var popup = new CPopup { BackgroundColor = Color.FromHex("#CCF0F8FF"), Content = new StackLayout { Children = { new Label { Text = "This ContentPopup is dismissed as a back key.", HorizontalTextAlignment = TextAlignment.Center, } } } }; await Navigation.ShowPopup(popup); }
public static async Task ShowPopup(ContentPopup popup) { if (popup == null) { return; } using (var renderer = DependencyService.Get <IContentPopupRenderer>(DependencyFetchTarget.NewInstance)) { if (renderer == null) { return; } renderer.SetElement(popup); await renderer.Open(); } }
public static async Task ShowPopup(this INavigation navigation, ContentPopup popup) { await ShowPopup(popup); }