Files
Ursa.Avalonia/src/Ursa/Controls/Dialog/Options/DialogOptions.cs
rabbitism c512cb6e13 Add resize functionality and improve dialog controls
This commit introduces the ability to resize dialogs by adding `CanResize` properties to dialog options and control classes. It also refines dialog controls' behavior and layout, ensuring consistent resizing capabilities across different dialog types. Additionally, it enhances the overlay feedback element's positioning logic and updates the resizer's appearance and visibility handling.
2024-09-17 22:44:35 +08:00

35 lines
1.2 KiB
C#

using Avalonia;
using Avalonia.Controls;
namespace Ursa.Controls;
public class DialogOptions
{
internal static DialogOptions Default { get; } = new DialogOptions();
/// <summary>
/// The Startup Location of DialogWindow. Default is <see cref="WindowStartupLocation.CenterOwner"/>
/// </summary>
public WindowStartupLocation StartupLocation { get; set; } = WindowStartupLocation.CenterOwner;
/// <summary>
/// The Position of DialogWindow startup location if <see cref="StartupLocation"/> is <see cref="WindowStartupLocation.Manual"/>
/// </summary>
public PixelPoint? Position { get; set; }
/// <summary>
/// Title of DialogWindow, Default is null
/// </summary>
public string? Title { get; set; }
/// <summary>
/// DialogWindow's Mode, Default is <see cref="DialogMode.None"/>
/// </summary>
public DialogMode Mode { get; set; } = DialogMode.None;
public DialogButton Button { get; set; } = DialogButton.OKCancel;
public bool? IsCloseButtonVisible { get; set; } = true;
public bool ShowInTaskBar { get; set; } = true;
public bool CanDragMove { get; set; } = true;
public bool CanResize { get; set; }
}