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.
This commit is contained in:
@@ -24,6 +24,9 @@ public abstract class DialogControlBase : OverlayFeedbackElement
|
||||
AvaloniaProperty.RegisterDirect<DialogControlBase, bool>(
|
||||
nameof(IsFullScreen), o => o.IsFullScreen, (o, v) => o.IsFullScreen = v);
|
||||
|
||||
public static readonly StyledProperty<bool> CanResizeProperty = AvaloniaProperty.Register<DialogControlBase, bool>(
|
||||
nameof(CanResize));
|
||||
|
||||
protected internal Button? _closeButton;
|
||||
|
||||
private bool _isFullScreen;
|
||||
@@ -36,6 +39,12 @@ public abstract class DialogControlBase : OverlayFeedbackElement
|
||||
IsFullScreenProperty.AffectsPseudoClass<DialogControlBase>(PC_FullScreen);
|
||||
}
|
||||
|
||||
public bool CanResize
|
||||
{
|
||||
get => GetValue(CanResizeProperty);
|
||||
set => SetValue(CanResizeProperty, value);
|
||||
}
|
||||
|
||||
internal HorizontalPosition HorizontalAnchor { get; set; } = HorizontalPosition.Center;
|
||||
internal VerticalPosition VerticalAnchor { get; set; } = VerticalPosition.Center;
|
||||
internal HorizontalPosition ActualHorizontalAnchor { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user