[Enhancement] IBorderElement.CornerRadius should be CornerRadius type
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
## Summary
Some elements supports `IBorderElement` implementation (`Button`, `CheckBox`, `Frame`, `ImageButton`, `RadioButton`).
This is useful to set the `CornerRadius` directly on the `Element` or by `Style`, without the `Border` control.
But currently, the `CornerRadius` is a `int` property, this limits these possibilities and is not consistent with other properties that provide the same purpose.
In my opinion, all `CornerRadius` properties should be of type `CornerRadius`, not `int`. (eg: [WinUI 3 Control.CornerRadius](https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.control.cornerradius?view=winui-3.0))
## API Changes
```cs
public interface IBorderElement
{
...
CornerRadius CornerRadius { get; }
...
}
```
## Intended Use Case
Define rounded corners in the same way in all controls that support it.
Contributor guide
Research direction
Start at the IBorderElement interface and search its implementations on Button, CheckBox, Frame, ImageButton, and RadioButton. Trace the existing CornerRadius properties and their usages, then verify that all affected controls expose the CornerRadius type consistently and that the relevant test suite passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100