Пример #1
0
        private async void List_ItemClick(object sender, ItemClickEventArgs e)
        {
            Hide();

            var item = e.ClickedItem as Sticker;

            if (item != null)
            {
                await StickerSetPopup.GetForCurrentView().ShowAsync(item.SetId);
            }
        }
Пример #2
0
        public static StickerSetPopup GetForCurrentView()
        {
            return(new StickerSetPopup());

            var id = ApplicationView.GetApplicationViewIdForWindow(Window.Current.CoreWindow);

            if (_windowContext.TryGetValue(id, out WeakReference <StickerSetPopup> reference) && reference.TryGetTarget(out StickerSetPopup value))
            {
                return(value);
            }

            var context = new StickerSetPopup();

            _windowContext[id] = new WeakReference <StickerSetPopup>(context);

            return(context);
        }