Пример #1
0
 public void ShowPopup(bool isShowing, PopupView popupView, bool deferDisable)
 {
     this.deferDisable = deferDisable;
     if (isShowing)
     {
         if (0.0 == this.PopupFrame.Opacity)
         {
             this.currentPopupView = popupView;
             this.currentPopupView.ControlsToAllowEnableChanged += new EventHandler(CurrentPopupView_ControlsToAllowEnableChanged);
             if (this.popupRendering)
             {
                 this.PopupFrame.StopLoading();
             }
             this.popupRendering = true;
             if (null == this.PopupFrame.Content || !this.PopupFrame.Content.GetType().Equals(popupView.GetType()))
             {
                 this.PopupFrame.Navigate(popupView);
             }
             else
             {
                 PopupFrame_ContentRendered(this.PopupFrame, EventArgs.Empty);
             }
             ManageShroudEffect(deferDisable);
         }
         else
         {
             this.pendingPopup = popupView;
         }
     }
     else
     {
         if (this.currentPopupView != null)
         {
             this.currentPopupView.ControlsToAllowEnableChanged -= new EventHandler(CurrentPopupView_ControlsToAllowEnableChanged);
             this.popupToClose     = this.currentPopupView;
             this.currentPopupView = null;
         }
         if (popupView == null)
         {
             ManageShroudEffect(deferDisable);
         }
         Show(false);
         this.pendingPopup = null;
     }
 }