Esempio n. 1
0
 public void HideDialog(DialogBaseControl dialog)
 {
     if (Equals(_parent.Content, dialog))
     {
         var oldContent = _layerStack.Last();
         _layerStack.Remove(oldContent);
         _parent.Content = oldContent;
     }
     else
         _layerStack.Remove(dialog);
 }
Esempio n. 2
0
 public void HideDialog(DialogBaseControl dialog)
 {
     if (Equals(_parent.Content, dialog))
     {
         var oldContent = _layerStack.Last();
         _layerStack.Remove(oldContent);
         _parent.Content = oldContent;
     }
     else
     {
         _layerStack.Remove(dialog);
     }
 }
Esempio n. 3
0
        public void Show()
        {
            if (DialogBaseControl != null)
            {
                throw new Exception("The dialog can only be shown once.");
            }

            InvokeUiCall(() =>
            {
                DialogBaseControl = new DialogBaseControl(_dialogHost.GetCurrentContent(), this);
                DialogBaseControl.SetCustomContent(Content);
                if (_verticalDialogAlignment.HasValue)
                {
                    DialogBaseControl.VerticalDialogAlignment = _verticalDialogAlignment.Value;
                }
                if (_horizontalDialogAlignment.HasValue)
                {
                    DialogBaseControl.HorizontalDialogAlignment = _horizontalDialogAlignment.Value;
                }
                _dialogHost.ShowDialog(DialogBaseControl);
            });
        }
Esempio n. 4
0
 public void ShowDialog(DialogBaseControl dialog)
 {
     _layerStack.Add(_parent.Content);
     _parent.Content = dialog;
 }
Esempio n. 5
0
 public void ShowDialog(DialogBaseControl dialog)
 {
     _layerStack.Add(_parent.Content);
     _parent.Content = dialog;
 }
Esempio n. 6
0
        public void Show()
        {
            if (DialogBaseControl != null)
                throw new Exception("The dialog can only be shown once.");

            InvokeUiCall(() =>
                {
                    DialogBaseControl = new DialogBaseControl(_dialogHost.GetCurrentContent(), this);
                    DialogBaseControl.SetCustomContent(Content);
                    if (_verticalDialogAlignment.HasValue)
                        DialogBaseControl.VerticalDialogAlignment = _verticalDialogAlignment.Value;
                    if (_horizontalDialogAlignment.HasValue)
                        DialogBaseControl.HorizontalDialogAlignment = _horizontalDialogAlignment.Value;
                    _dialogHost.ShowDialog(DialogBaseControl);
                });
        }