dotnet / dotnet/wpf

Rounded Corners

Open
#8,544 1 comment 6 reactions 0 assignees View on GitHub
User Story Win 11 Theming
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

As on now, most of the controls where CornerRadius is needed, we have set the default value that's defined in Fluent theme styles by using `Border.CornerRadius` property in style, however this is not customizable and developers cannot set is as follows :
```

...
```

The only way that can be used right now is as follows :
```

<Setter Property="Border.CornerRadius" Value="8" />

```
This will make it tougher for developers to customize corner radius. Here are the next steps / work items that need to be done regarding this task.

**Primary Tasks**
- [x] Prioritize controls where rounded corners add more visual value
- [ ] Finalize a way to allow customizing CornerRadius for controls other than Border

**Secondary Tasks**
- [ ] Write performance measurement benchmark for rounded corners.
- [ ] For container controls - Check performance impact.

### Notes:

- CornerRadius Property and Converter already existing for wpf.
- For button and some other controls this property is not Present in the backing cs file. We might need to add this property to those controls. [API Change]
- We might not want to have CornerRadius property in all the xaml file with the same values to avoid duplication.
- We can have a list of variables, which contains the cornerradius values, and we can set CornerRadius property with this value as a DynamicResource.
- Performance needs to be assessed per control and multiple controls on the same window and for different categories of controls like container controls, nested controls.

### Open Questions:
- Clarify what happens when the Dev overrides the cornerRadius attribute in the app?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.