-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingproposal/opent/enhancement ☀️New feature or requestNew feature or request
Milestone
Description
Rounded Corners
Rounded Corners are a common visual requirement.
API
We need to add an interface for defining what's required for a View to implement corner rounding (and provide CSS support):
interface IRoundedCorner
{
CornerRadius CornerRadius { get; }
void CornerRadiusChanged(CornerRadius oldValue, CornerRadius newValue);
}The CornerRadius BindableProperty can be implemented in one place:
static class RoundedCorner
{
public static readonly BindableProperty CornerRadiusProperty =
BindableProperty.Create(nameof(CornerRadius), typeof(CornerRadius), typeof(IRoundedCorners));
}The following Views are candidates for rounded corners:
- BoxView
- Button
- Image
- ImageButton
- Layouts
- ScrollView
Scenarios
C# Example
var grid = new Grid();
grid.CornerRadius = new CornerRadius(12, 0, 12, 6);XAML Example
<Grid
CornerRadius="12, 0, 12, 6">
</Grid>Difficulty: Medium
Providing the interface is simple; individual implementations may vary in difficulty.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingproposal/opent/enhancement ☀️New feature or requestNew feature or request
