Example #1
0
        public void ShowModalPage(ModalDialog dialog)
        {
            _modalOwner.Children.Clear();
            _modalOwner.Children.Add(dialog);

            //Sets position of modal dialog at center of _modalOwner Canvas.
            Canvas.SetLeft(dialog, (ActualWidth - dialog.Width) / 2);
            Canvas.SetTop(dialog, (ActualHeight - dialog.Height) / 2);

            VisualStateManager.GoToState(this, "ShowModalDialog", true);
            dialog.Closed += onModalDialogClosed;
        }
        public void ShowModalPage(ModalDialog dialog)
        {
            _modalOwner.Children.Clear();
            _modalOwner.Children.Add(dialog);

            //Sets position of modal dialog at center of _modalOwner Canvas.
            Canvas.SetLeft(dialog, (ActualWidth - dialog.Width)/2);
            Canvas.SetTop(dialog, (ActualHeight - dialog.Height)/2);

            VisualStateManager.GoToState(this, "ShowModalDialog", true);
            dialog.Closed += onModalDialogClosed;
        }