public void Close()
        {
            var result = Result;

            // Dialog wird angezeigt?
            if (DialogBaseControl == null)
            {
                return;
            }

            // Callbacks abhängen
            Ok     = null;
            Cancel = null;
            Yes    = null;
            No     = null;

            InvokeUICall(
                () => {
                _dialogHost.HideDialog(DialogBaseControl);
                DialogBaseControl.SetCustomContent(null);
                if (DialogClosed != null)
                {
                    DialogClosed(this, new DialogClosedEventArgs(result));
                }
            });
        }
Beispiel #2
0
        public void Close()
        {
            // Dialog wird angezeigt?
            if (DialogBaseControl == null)
            {
                return;
            }

            // Callbacks abhängen
            Ok     = null;
            Cancel = null;
            Yes    = null;
            No     = null;

            InvokeUICall(
                () =>
            {
                _dialogHost.HideDialog(DialogBaseControl);
                DialogBaseControl.SetCustomContent(null);
            });
        }
        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);
            });
        }
Beispiel #4
0
        public void Show()
        {
            if (DialogBaseControl != null)
            {
                throw new Exception("The dialog can only be shown once.");
            }

            InvokeUICall(() =>
            {
                DialogBaseControl = new DialogBaseControl(this);
                DialogBaseControl.SetCustomContent(_content);
                if (_verticalDialogAlignment.HasValue)
                {
                    DialogBaseControl.VerticalDialogAlignment = _verticalDialogAlignment.Value;
                }
                if (_horizontalDialogAlignment.HasValue)
                {
                    DialogBaseControl.HorizontalDialogAlignment = _horizontalDialogAlignment.Value;
                }

                //_dialogHost.ShowDialog(DialogBaseControl);
                _overviewViewModel.DialogPlaceholder = DialogBaseControl;
            });
        }
Beispiel #5
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);
				});
		}