feat: refactor OverlayDialog and add options.

This commit is contained in:
rabbitism
2024-02-02 00:01:18 +08:00
parent fb11be0169
commit 8f4d88b87f
8 changed files with 280 additions and 58 deletions

View File

@@ -19,11 +19,18 @@ public class DialogControl: ContentControl
protected internal Button? _closeButton;
private Panel? _titleArea;
internal HorizontalPosition HorizontalAnchor { get; set; }
internal VerticalPosition VerticalAnchor { get; set; }
internal double? InitialHorizontalOffset { get; set; }
internal double? InitialVerticalOffset { get; set; }
internal bool CanClickOnMaskToClose { get; set; }
public event EventHandler<DialogLayerChangeEventArgs>? LayerChanged;
public event EventHandler<object?>? DialogControlClosing;
static DialogControl()
{
{
DataContextProperty.Changed.AddClassHandler<DialogControl, object?>((o, e) => o.OnDataContextChange(e));
}