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:
@@ -149,10 +149,14 @@ public abstract class OverlayFeedbackElement : ContentControl
|
||||
{
|
||||
if (containerBounds is not null)
|
||||
{
|
||||
var minX = -left;
|
||||
var minY = -top;
|
||||
var maxX = containerBounds.Value.Width - left - width;
|
||||
var maxY = containerBounds.Value.Height - top - height;
|
||||
var minX = windowEdge is WindowEdge.West or WindowEdge.NorthWest or WindowEdge.SouthWest
|
||||
? -left
|
||||
: double.NegativeInfinity;
|
||||
var minY = windowEdge is WindowEdge.North or WindowEdge.NorthEast or WindowEdge.NorthWest
|
||||
? -top
|
||||
: double.NegativeInfinity;
|
||||
var maxX = containerBounds.Value.Width - left - MinWidth;
|
||||
var maxY = containerBounds.Value.Height - top - MinHeight;
|
||||
diff = new Point(MathHelpers.SafeClamp(diff.X, minX, maxX), MathHelpers.SafeClamp(diff.Y, minY, maxY));
|
||||
}
|
||||
switch (windowEdge)
|
||||
|
||||
Reference in New Issue
Block a user