public static ModalFlyout FromMessage(ModalFlyoutMessage message) { var flyout = new ModalFlyout() { Content = message }; foreach (var command in message.Commands) { command.Executed += flyout.RaiseCloseEvent; } return(flyout); }
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); }