Пример #1
0
        public PopupPositioner(Popup popup)
        {
            if (!IsSupported)
            {
                throw new NotSupportedException();
            }

            _popup     = popup;
            _secHelper = new PopupSecurityHelper();

            SetPositioner(popup, this);

            popup.Opened += OnPopupOpened;
            popup.Closed += OnPopupClosed;

            if (popup.IsOpen)
            {
                OnPopupOpened(null, null);
            }
        }
Пример #2
0
        public PopupPositioner(Popup popup)
        {
            if (!IsSupported)
            {
                throw new NotSupportedException();
            }

            _popup     = popup;
            _secHelper = new PopupSecurityHelper(Fields._secHelper.GetValue(_popup));

            SetPositioner(popup, this);

            BindingOperations.SetBinding(this, IsOpenProperty, new Binding {
                Path = new PropertyPath(Popup.IsOpenProperty), Source = popup
            });

            popup.Opened += OnPopupOpened;

            if (popup.IsOpen)
            {
                OnPopupOpened(null, null);
            }
        }
Пример #3
0
 /// <summary>
 ///     Default constructor
 /// </summary>
 public Popup() : base()
 {
     // create popup's security helper
     _secHelper = new PopupSecurityHelper();
 }