-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Coding Style and Conventions
Rosario Pulella edited this page Sep 23, 2020
·
3 revisions
In general, the project follows the C# Coding Convention and Framework Design Guidelines. We use tools like StyleCop to help enforce some of the rules below.
- DO NOT require that users perform any extensive initialization before they can start programming basic scenarios.
- DO provide good defaults for all values associated with parameters, options, etc.
- DO ensure that APIs are intuitive and can be successfully used in basic scenarios without referring to the reference documentation.
- DO communicate incorrect usage of APIs as soon as possible.
- DO design an API by writing code samples for the main scenarios. Only then, you define the object model that supports those code samples.
- DO NOT use regions. DO use partial classes instead.
- DO declare static dependency properties at the top of their file.
- DO NOT seal controls.
- DO use extension methods over static methods where possible.
- DO NOT return true or false to give success status. Throw exceptions if there was a failure.
- DO use verbs like GET.
- DO NOT use verbs that are not already used like fetch.
Fork the repo and Send the PR ππ
Any changes to the wiki made directly here on GitHub will be overwritten by the wiki repo commits
- Home π
- Welcome π
- Windows Community Toolkit π§°
- Features π¬
- Principles βοΈ
- Roadmap πΊ
- .NET Foundation
- Why Microsoft supports this project
- License π
- Sample App π±
- Getting Started π
- NuGet Packages π¦
- Preview Packages π
- Toolkit Labs π§ͺ
- Questions β
- Discussions π₯
- Submitting an Issue βοΈ
- Good First Issue π
- Help Wanted π
- Bug Fixes π
- Feature Requests π«
- Create and Submit PullRequest π
- Documentation π
- Review PR π
- Avoid Roadblocks π§
- Quick Start β‘
- Required Dependencies π
- Coding Style and Conventions β
- Testing π§ͺ
- Sample Development π±
- Accessibility Guideline βΏ
- Building XAML Controls π
- Fabric Bot Services π€
- CI and Infrastructure πΎ
- How the Project is Organized ποΈ
- Join the Toolkit Organization πͺ
- Hall of Fame π