/// <summary> /// Opens the specified modal dialog box and returns a <see cref="Task"/> that completes /// when the modal dialog box is closed. /// </summary> /// <param name="window">The window in which to open the modal dialog box.</param> /// <param name="modal">The modal dialog box to open.</param> /// <param name="duration">The amount of time over which to transition the modal dialog /// box's state, or <see langword="null"/> to use the default transition time.</param> /// <returns>A <see cref="ModalTask{T}"/> that completes when the modal dialog box is closed.</returns> public static ModalTask <Boolean?> ShowDialogAsync(IUltravioletWindow window, Modal modal, TimeSpan?duration = null) { Contract.Require(modal, nameof(modal)); return(modal.ShowAsync(window, duration)); }
/// <summary> /// Opens the specified modal dialog box. /// </summary> /// <param name="window">The window in which to open the modal dialog box.</param> /// <param name="modal">The modal dialog box to open.</param> /// <param name="duration">The amount of time over which to transition the modal dialog /// box's state, or <see langword="null"/> to use the default transition time.</param> public static void ShowDialog(IUltravioletWindow window, Modal modal, TimeSpan?duration = null) { Contract.Require(modal, nameof(modal)); modal.Show(window, duration); }
/// <summary> /// Opens the specified modal dialog box in the primary window and returns a <see cref="Task"/> that completes /// when the modal dialog box is closed. /// </summary> /// <param name="modal">The modal dialog box to open.</param> /// <param name="duration">The amount of time over which to transition the modal dialog /// box's state, or <see langword="null"/> to use the default transition time.</param> /// <returns>A <see cref="ModalTask{T}"/> that completes when the modal dialog box is closed.</returns> public static ModalTask <Boolean?> ShowDialogAsync(Modal modal, TimeSpan?duration = null) { return(ShowDialogAsync(null, modal, duration)); }
/// <summary> /// Opens the specified modal dialog box in the primary window. /// </summary> /// <param name="modal">The modal dialog box to open.</param> /// <param name="duration">The amount of time over which to transition the modal dialog /// box's state, or <see langword="null"/> to use the default transition time.</param> public static void ShowDialog(Modal modal, TimeSpan?duration = null) { ShowDialog(null, modal, duration); }