Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corner Radius (aka Rounded Corner) How-To document #34

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2614231
Create roundedcorner.md
chigy May 31, 2019
5d0d5a6
Update roundedcorner.md
chigy May 31, 2019
c007456
Update roundedcorner.md
chigy May 31, 2019
896f6fd
Update roundedcorner.md
chigy May 31, 2019
8fb83b1
Update roundedcorner.md
chigy May 31, 2019
832588f
Create Readme.txt
chigy May 31, 2019
e5a509a
Add files via upload
chigy May 31, 2019
5abed9a
Delete Grid View.png
chigy May 31, 2019
00c2823
Add files via upload
chigy May 31, 2019
583d881
Add files via upload
chigy May 31, 2019
e9b18cd
Delete Grid View.png
chigy May 31, 2019
2f816a8
Create Grid View.png
chigy May 31, 2019
cac537a
Add files via upload
chigy May 31, 2019
8fa8cd6
Delete Grid View.png
chigy May 31, 2019
a109a9f
Add files via upload
chigy May 31, 2019
3224f9e
Add files via upload
chigy May 31, 2019
281cda9
Delete Grid View 1.png
chigy May 31, 2019
112f92d
Update roundedcorner.md
chigy May 31, 2019
0cad650
Add files via upload
chigy May 31, 2019
332a48b
Update roundedcorner.md
chigy May 31, 2019
0bdadae
Update roundedcorner.md
chigy May 31, 2019
c34b645
Add files via upload
chigy May 31, 2019
cf24939
Update roundedcorner.md
chigy May 31, 2019
4d733c7
Add files via upload
chigy May 31, 2019
33f0009
Update roundedcorner.md
chigy May 31, 2019
85bf5af
Add files via upload
chigy May 31, 2019
8875093
Add files via upload
chigy May 31, 2019
dfcda76
Update roundedcorner.md
chigy May 31, 2019
8f907f6
Delete SplitButton.png
chigy May 31, 2019
c747140
Add files via upload
chigy May 31, 2019
d754c57
Update roundedcorner.md
chigy May 31, 2019
f47483e
Update roundedcorner.md
chigy May 31, 2019
d013a02
Delete SplitButton.png
chigy May 31, 2019
a29c73d
Update roundedcorner.md
chigy Jun 1, 2019
9948823
Add files via upload
chigy Jun 1, 2019
a37c4a4
Update roundedcorner.md
chigy Jun 1, 2019
577259d
typos (#30)
mrlacey Jun 3, 2019
379167f
Update roundedcorner.md
chigy Jun 3, 2019
9f9f119
Delete Readme.txt
chigy Jun 5, 2019
a4fe7e9
Update roundedcorner.md
chigy Jun 6, 2019
b3c0fce
Add files via upload
chigy Jun 6, 2019
92fd8ee
Update roundedcorner.md
chigy Jun 6, 2019
3bda3d3
Add files via upload
chigy Jun 28, 2019
25abcc2
Update roundedcorner.md
chigy Jun 28, 2019
bd36ac2
Update roundedcorner.md
chigy Jun 28, 2019
b83ba63
Update roundedcorner.md
chigy Jun 28, 2019
ba10f1a
Update roundedcorner.md
chigy Jun 28, 2019
7672dc7
Update roundedcorner.md
chigy Jun 28, 2019
7d24614
Update active/RoundedCorner/roundedcorner.md
chigy Jul 2, 2019
7d6ef90
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
f0180b9
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
52aef18
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
8a47d41
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
3b4cac9
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
969062f
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
edd09ad
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
6429dfd
Update roundedcorner.md
chigy Jul 12, 2019
1046880
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
0819591
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
76ba1f5
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
22aaac6
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
615c859
Update active/RoundedCorner/roundedcorner.md
chigy Jul 12, 2019
79ca32b
Apply suggestions from code review
chigy Jul 12, 2019
19b345c
Added to customization section
kikisaints Sep 18, 2019
2cfd60c
Update roundedcorner.md
chigy Oct 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added active/RoundedCorner/ImageFiles/AutoSuggest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Bars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Button2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Flip View.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Flyout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Grid View.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Lists.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Menu Bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Pickers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Pivot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/ScrollBar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Scrolling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Selectors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/SplitButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added active/RoundedCorner/ImageFiles/Text Inputs.png
Binary file added active/RoundedCorner/ImageFiles/Tooltips.png
Binary file added active/RoundedCorner/ImageFiles/Tree View.png
109 changes: 109 additions & 0 deletions active/RoundedCorner/roundedcorner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Corner Radius
![button](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/Button2.png)
<Add thinking behind why we are rounding corners related to Fluent design.>

## Background
This "spec" will be what is being proposed to be copied over to docs.microsoft.com as a documentation under https://docs.microsoft.com/en-us/windows/uwp/design/style/ "Corner Radius" page to be created.

I am trying out writing a little more "background explanation (WHY)" that our customers have expressed we provide with our documentatiton in some of our focus groups. I would like feedback as this does not follow normal documentation pattern.

## Principles
*Todo: Work with Fluent collective to put together something here around WHY*

## Default control designs
There are mainly 3 types of UI parts where the radii of the corners are being rounded and here are the descriptions of how this is applied to default controls.

*Corners of rectangle UI elements*
- These UI elements include basic UIs like buttons that users see them on a surface of the screen at all times.
chigy marked this conversation as resolved.
Show resolved Hide resolved
- The default radius value we use are 2px for these UI.
![Button](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/Button.png)

**Controls being rounded**
- Button
- CheckBox
- ComboBox
- DropDownButton
- Slider
- SplitButton
- ToggleButton
- ToggleSplitButton
- Flipview
- GridView
- ListView
- TreeView
- ContentDialog
- AutoSuggestBox
- PasswordBox
- RichEditBox
- TextBox
- DatePicker
- CalendarDatePicker
- Tab control

*Corners of flyout UI elements*
- These UI elements are those that appear temporarily on UI like a MenuFlyout or Flyout.
chigy marked this conversation as resolved.
Show resolved Hide resolved
- The default radius value we use here are 4px.
![flyout](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/Flyout.png)

**Controls being rounded**
- CalendarDatePicker
- DatePicker
- TimePicker
- Flyout
- TeachingTip
- ToolTip
- DropDownButton
- SplitButton
- Slider
chigy marked this conversation as resolved.
Show resolved Hide resolved
- AutoSuggestBox
- CommandBarFlyout
- MenuFlyout
- ComboBox
- ColorPicker
- MediaPlayerElement
- ContentDialog
- MenuBar
- ToggleSplitButton

*Rounding of bars*
- These UI elements are bar like or line like UI (e.g. ProgressBar).
chigy marked this conversation as resolved.
Show resolved Hide resolved
- The default radius value we use here are 2px except for slider in ColorPicker which will be 6px because the bar is wider.
chigy marked this conversation as resolved.
Show resolved Hide resolved
![bars](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/Bars.png)

**Controls being rounded**
- NavigationView
chigy marked this conversation as resolved.
Show resolved Hide resolved
- Pivot
chigy marked this conversation as resolved.
Show resolved Hide resolved
- ScrollIndicator
- ProgressBar
- Slider
- ColorPicker
chigy marked this conversation as resolved.
Show resolved Hide resolved
- MediaPlayerElement
chigy marked this conversation as resolved.
Show resolved Hide resolved
- WebView (may or may not get it from XAML change, checking)
chigy marked this conversation as resolved.
Show resolved Hide resolved

*When not to round*
chigy marked this conversation as resolved.
Show resolved Hide resolved
- When a multiple buttons are inside a single button that houses them (e.g. SplitButton).
chigy marked this conversation as resolved.
Show resolved Hide resolved
![SplitButton](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/SplitButton2.png)
- When a control is housed inside another container (e.g. ScrollBar's bar and buttons that are part of the ScrollBar container which is also part of a ScrollViewer).
chigy marked this conversation as resolved.
Show resolved Hide resolved

![ScrollBar](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/ScrollBar.png)
- When flyout UI element that is connected to a UI that invokes the flyout on one side.
![AutoSuggest](https://github.com/microsoft/microsoft-ui-xaml-specs/blob/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles/AutoSuggest.png)

## Note on keyboard focus rect and shadow
chigy marked this conversation as resolved.
Show resolved Hide resolved
Currently our default design does not require any special work to round the corners of keyboard focus rectangle and shadow. Using higher corner radius value will not break them functionally, however it is good to be aware of this to avoid unwanted visual glitches that you could introduce with a larger value.
chigy marked this conversation as resolved.
Show resolved Hide resolved

# Rounded Corner and Performance
People may not always be aware of the fact drawing rounded corner naturally use more drawing power compared to square corners. When selecting the value of corner radius, we not only considered the design principles but also were very careful to ensure developers who use our default controls are able to successfully deliver performant applications.

To simplify this section, think of performance issues mentioned here to be mainly about page load time as well as app launch time.

Key information to note:
- Rounded corners on a larger surface UI are less performant. Avoid drawing rounded corner on a full screen app UI. This is less of an issue if the UI is displayed briefly (e.g. ContentDialog).

# Customization options
<Add spec details from [#279](https://github.com/microsoft/microsoft-ui-xaml/issues/279) once the feature is complete here in this section>

# Appendix
Here are relevant visual comp files:
- Raw files: https://github.com/microsoft/microsoft-ui-xaml-specs/tree/user/chigy/roundedcorner/active/RoundedCorner/ImageFiles
- In an easier to consume format thanks to community: https://github.com/mrlacey/microsoft-ui-xaml-specs/blob/RoundedCornerVisualizations/active/RoundedCorner/ImageFiles/index.md