feat: simplify dialog option.

This commit is contained in:
rabbitism
2024-02-10 00:42:44 +08:00
parent 896d22dcce
commit 7a9bdf231d
8 changed files with 51 additions and 39 deletions

View File

@@ -17,16 +17,32 @@ public enum VerticalPosition
public class OverlayDialogOptions
{
internal static OverlayDialogOptions Default { get; } = new OverlayDialogOptions();
public bool CanClickOnMaskToClose { get; set; } = false;
public HorizontalPosition HorizontalAnchor { get; set; } = HorizontalPosition.Center;
public VerticalPosition VerticalAnchor { get; set; } = VerticalPosition.Center;
/// <summary>
/// This attribute is only used when HorizontalAnchor is not Center
/// </summary>
public double? HorizontalOffset { get; set; } = null;
/// <summary>
/// This attribute is only used when VerticalAnchor is not Center
/// </summary>
public double? VerticalOffset { get; set; } = null;
/// <summary>
/// Only works for DefaultDialogControl
/// </summary>
public DialogMode Mode { get; set; } = DialogMode.None;
/// <summary>
/// Only works for DefaultDialogControl
/// </summary>
public DialogButton Buttons { get; set; } = DialogButton.OKCancel;
/// <summary>
/// Only works for DefaultDialogControl
/// </summary>
public string? Title { get; set; } = null;
public bool IsCloseButtonVisible { get; set; } = true;
/// <summary>
/// Only works for CustomDialogControl
/// </summary>
public bool ShowCloseButton { get; set; } = true;
public bool CanLightDismiss { get; set; }
public bool CanDragMove { get; set; } = true;
}