feat: replace mask with pure rectangle to reduce layout calculation

This commit is contained in:
rabbitism
2024-02-05 13:54:58 +08:00
parent 2ac5dfa170
commit 35b3a2f659
6 changed files with 99 additions and 18 deletions

View File

@@ -25,8 +25,8 @@ public partial class OverlayDialogHost
this.Children.Add(mask);
this.Children.Add(control);
control.Measure(this.Bounds.Size);
control.Arrange(new Rect(control.DesiredSize));
control.Height = this.Bounds.Height;
control.Arrange(new Rect(control.DesiredSize).WithHeight(this.Bounds.Height));
// control.Height = this.Bounds.Height;
control.AddHandler(OverlayFeedbackElement.ClosedEvent, OnDrawerControlClosing);
var animation = CreateAnimation(control.Bounds.Width);
var animation2 = CreateOpacityAnimation();