feat: unify option name.
This commit is contained in:
@@ -43,6 +43,8 @@ public class OverlayDialogOptions
|
||||
/// <summary>
|
||||
/// Only works for CustomDialogControl
|
||||
/// </summary>
|
||||
public bool IsCloseButtonVisible { get; set; } = true;
|
||||
[Obsolete()]
|
||||
public bool ShowCloseButton { get; set; } = true;
|
||||
public bool CanLightDismiss { get; set; }
|
||||
public bool CanDragMove { get; set; } = true;
|
||||
|
||||
@@ -195,7 +195,7 @@ public static class OverlayDialog
|
||||
control.HorizontalAnchor == HorizontalPosition.Center ? null : options.HorizontalOffset;
|
||||
control.VerticalOffset =
|
||||
options.VerticalAnchor == VerticalPosition.Center ? null : options.VerticalOffset;
|
||||
control.IsCloseButtonVisible = options.ShowCloseButton;
|
||||
control.IsCloseButtonVisible = options.IsCloseButtonVisible;
|
||||
control.CanLightDismiss = options.CanLightDismiss;
|
||||
DialogControlBase.SetCanDragMove(control, options.CanDragMove);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public static class Drawer
|
||||
{
|
||||
options ??= DrawerOptions.Default;
|
||||
drawer.Position = options.Position;
|
||||
drawer.IsCloseButtonVisible = options.ShowCloseButton;
|
||||
drawer.IsCloseButtonVisible = options.IsCloseButtonVisible;
|
||||
drawer.CanLightDismiss = options.CanLightDismiss;
|
||||
if (options.Position == Position.Left || options.Position == Position.Right)
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ public class DrawerOptions
|
||||
public double? MaxHeight { get; set; } = null;
|
||||
public DialogButton Buttons { get; set; } = DialogButton.OKCancel;
|
||||
public string? Title { get; set; }
|
||||
[Obsolete("Use IsCloseButtonVisible")]
|
||||
public bool ShowCloseButton { get; set; } = true;
|
||||
/// <summary>
|
||||
/// The hash code of the top level dialog host. This is used to identify the dialog host if there are multiple dialog hosts with the same id. If this is not provided, the dialog will be added to the first dialog host with the same id.
|
||||
|
||||
Reference in New Issue
Block a user