コード例 #1
0
 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);
 }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
 public static async Task ShowPopup(this INavigation navigation, ContentPopup popup)
 {
     await ShowPopup(popup);
 }