This repository was archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
This repository was archived by the owner on May 1, 2024. It is now read-only.
Corner Treatments #5280
Copy link
Copy link
Closed
Labels
e/7 🕖77inactiveIssue is older than 6 months and needs to be retestedIssue is older than 6 months and needs to be retestedp/Androidp/UWPp/iOS 🍎proposal-opent/enhancement ➕
Description
Layout Corner APIs
The following APIs will be applicable to all elements that are able to support the native level shapes. Currently this should just be for Cards and Buttons
public namespace Xamarin.Forms
{
public class CornerShapeModel
{
public CornerTreatment TopLeft;
public CornerTreatment TopRight;
public CornerTreatment BottomLeft;
public CornerTreatment BottomRight;
}
public enum UnitType
{
Percentage, Points
}
public class CornerTreatment
{
}
public class RoundedCornerTreatment : CornerTreatment
{
public double Radius { get; set; }
public UnitType Unit { get; set; }
}
public class CutCornerTreatment : CornerTreatment
{
public double Size { get; set; }
public UnitType Unit { get; set; }
}
public static CornerShapeModel Corners { get; set; } //BP
}
<Button CornerShape="cut:5%, circle:4, circle:10, cut:3%">
</Button>
<Frame CornerShape="cut:5%, circle:4, circle:10, cut:3%">
</Frame>
<!-- this will just apply circles to everything -->
<Button CornerShape="circle:5%, 4, 10, 3%">
<!-- defaults to round -->
<Button CornerShape="5%, 4, 10, 3%">
</Button>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
e/7 🕖77inactiveIssue is older than 6 months and needs to be retestedIssue is older than 6 months and needs to be retestedp/Androidp/UWPp/iOS 🍎proposal-opent/enhancement ➕