Beispiel #1
0
        public PopupWrapper(IPopupClient client, RectangleSpacing spacing)
        {
            Client = client;
            Client.OnClose += Close;
            Client.OnRedirect += ClientOnOnRedirect;

            if (spacing.AdjustedWidth.HasValue)
                Client.UserControl.Width = spacing.AdjustedWidth.Value;

            if (spacing.AdjustedHeight.HasValue)
                Client.UserControl.Height = spacing.AdjustedHeight.Value;
            
            PopupDisplay = new Popup
            {
                Child = Client.UserControl,
                VerticalOffset = spacing.Top,
                HorizontalOffset = spacing.Left
            };
        }
Beispiel #2
0
        public PopupWrapper(IPopupClient client, RectangleSpacing spacing)
        {
            Client             = client;
            Client.OnClose    += Close;
            Client.OnRedirect += ClientOnOnRedirect;

            if (spacing.AdjustedWidth.HasValue)
            {
                Client.UserControl.Width = spacing.AdjustedWidth.Value;
            }

            if (spacing.AdjustedHeight.HasValue)
            {
                Client.UserControl.Height = spacing.AdjustedHeight.Value;
            }

            PopupDisplay = new Popup
            {
                Child            = Client.UserControl,
                VerticalOffset   = spacing.Top,
                HorizontalOffset = spacing.Left
            };
        }
Beispiel #3
0
 public PopupWrapper(IPopupClient client, RectangleSpacing spacing, IApplicationBar applicationBar)
     : this(client, spacing)
 {
     ApplicationBar = applicationBar;
 }
Beispiel #4
0
        private void SetupPopup(IPopupClient apiKeyFetcher)
        {
            const int vertOffset = 48;
            const int horizOffset = 40;
            var appHost = Application.Current.Host.Content;
            var pageSize = new Size(appHost.ActualWidth, appHost.ActualHeight);
            var spacing = new RectangleSpacing(vertOffset, horizOffset, pageSize);

            Popup = new PopupWrapper(apiKeyFetcher, spacing, ApplicationBar);
            Popup.OnClose += PopupOnClose;
            Popup.OnRedirect += PopupOnRedirect;
            Popup.Open();
        }
Beispiel #5
0
 public PopupWrapper(IPopupClient client, RectangleSpacing spacing, IApplicationBar applicationBar)
     :this(client, spacing)
 {
     ApplicationBar = applicationBar;
 }