feat: basic position.

This commit is contained in:
rabbitism
2024-02-05 19:40:11 +08:00
parent 8e085bc264
commit fd85efd895
13 changed files with 222 additions and 46 deletions

View File

@@ -16,12 +16,12 @@ public abstract class DrawerControlBase: OverlayFeedbackElement
public const string PART_CloseButton = "PART_CloseButton";
internal bool CanClickOnMaskToClose { get; set; }
internal bool ShowCloseButton { get; set; }
protected internal Button? _closeButton;
public static readonly StyledProperty<Position> PositionProperty = AvaloniaProperty.Register<DrawerControlBase, Position>(
nameof(Position));
public static readonly StyledProperty<Position> PositionProperty =
AvaloniaProperty.Register<DrawerControlBase, Position>(
nameof(Position), defaultValue: Position.Right);
public Position Position
{
@@ -48,6 +48,9 @@ public const string PART_CloseButton = "PART_CloseButton";
set => SetValue(IsCloseButtonVisibleProperty, value);
}
protected internal bool ShowMask { get; set; }
protected internal bool CanLightDismiss { get; set; }
static DrawerControlBase()
{
DataContextProperty.Changed.AddClassHandler<DrawerControlBase, object?>((o, e) => o.OnDataContextChange(e));