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.
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):
The CornerRadius BindableProperty can be implemented in one place:
The following Views are candidates for rounded corners:
Scenarios
C# Example
XAML Example
Difficulty: Medium
Providing the interface is simple; individual implementations may vary in difficulty.