예제 #1
0
        public static ModalFlyout FromMessage(ModalFlyoutMessage message)
        {
            var flyout = new ModalFlyout()
            {
                Content = message
            };

            foreach (var command in message.Commands)
            {
                command.Executed += flyout.RaiseCloseEvent;
            }

            return(flyout);
        }
예제 #2
0
        public static ModalFlyout Create(
            string header,
            string body,
            Action?okAction,
            Action?cancelAction = null)
        {
            var message = new ModalFlyoutMessage(header, body, ModalFlyoutMessageCommand.CreateDefault(okAction), ModalFlyoutMessageCommand.CreateCancel(cancelAction));
            var flyout  = new ModalFlyout {
                Content = message
            };

            foreach (var command in message.Commands)
            {
                command.Executed += flyout.RaiseCloseEvent;
            }

            return(flyout);
        }