Skip to content

Commit

Permalink
fix: Ensure clipping when corner radius is set
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Dec 6, 2022
1 parent c0b9df0 commit 5da0fad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ private static IDisposable InnerCreateLayer(UIElement owner, LayoutState state)

parent.Children.InsertAtTop(borderVisual);
}


owner.ClippingIsSetByCornerRadius = true;
parent.Clip = compositor.CreateRectangleClip(
0, 0, (float)area.Width, (float)area.Height,
fullCornerRadius.Outer.TopLeft, fullCornerRadius.Outer.TopRight, fullCornerRadius.Outer.BottomRight, fullCornerRadius.Outer.BottomLeft);
Expand Down

0 comments on commit 5da0fad

Please sign in to comment.