Exemplo 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);
 }
Exemplo 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);
     }
 }
Exemplo 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);
            });
        }
Exemplo n.º 4
0
 public void ShowDialog(DialogBaseControl dialog)
 {
     _layerStack.Add(_parent.Content);
     _parent.Content = dialog;
 }
Exemplo n.º 5
0
 public void ShowDialog(DialogBaseControl dialog)
 {
     _layerStack.Add(_parent.Content);
     _parent.Content = dialog;
 }
Exemplo 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);
                });
        }