Exemple #1
0
 private void Popups_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Add)
     {
         foreach (Popup item in e.NewItems)
         {
             _popupInit.Add(item);
         }
     }
 }
Exemple #2
0
        public static PopupPageInitializer GetPopUpInitializer(ContentPage page, Popup popup, bool lateInit)
        {
            if (cache.ContainsKey(page))
            {
                var init = cache[page];
                init.Add(popup);
                return(init);
            }
            else
            {
                if (lateInit)
                {
                    throw new PopUpNotInitializedException();
                }

                var init = new PopupPageInitializer(page);
                if (popup != null)
                {
                    init.Add(popup);
                }
                cache.Add(page, init);
                return(init);
            }
        }