[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Collapse]CodeRush
  System Requirements
  Improve Performance
 [Expand]Features by Language
 [Expand]Getting Started
 [Expand]How To
 [Expand]Coding Assistance
 [Expand]Navigation and Search Tools
 [Expand]Static Code Analysis
 [Expand]Visualization Tools
 [Collapse]Code Style Assistance
  [Collapse]Code Formatters
    Add/Remove Block Delimiters
    Break Apart/Line Up Parameters/
    Break Apart/LineUp Attributes (XAML)
    Collapse Accessors
    Collapse/Expand Getter/Setter
    Collapse/Expand Method
    Collapse/Expand Property
    Remove All Redundant Block Delimiters
    Sort Namespace References
   Programming Style Rules
   Naming Conventions
   Code Cleanup
   Remove Unused Assembly References
   Document Formatting (C#)
   Document Formatting (XAML)
   Member Organization
   Move Member to Region
  Building Assistance
  Debugging Assistance
 [Expand]Refactoring Assistance
 [Expand]Unit Testing Assistance
 [Expand]Decompiling Tools
 [Expand]Configuration Options
 [Expand]Extensibility
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Code Formatters

Code Formatters are CodeRush features that enable you to automatically perform routine changes in your code.

CodeRush adds refactorings, code providers, and code formatters to Visual Studio's light bulb menu (Code Actions Menu). To invoke the Code Actions Menu, put the caret on the part of the code you need to change, press Ctrl + . or Ctrl + ~, and choose the required action from the invoked menu. When the cursor is on a Code Action Menu item, you can see a preview of the changes that will be made to your code.

Entries in the Code Actions Menu fall into the following categories:

  1. Code Formatters — do not change code behavior, but can improve code readability and layout to match a certain style. For instance, Sort Namespace References.
  2. Refactorings — do not change code behavior, but can simplify your code, improve readability, make code more flexible (for future changes), or bring the code to meet certain standards. For instance, Inline Method.
  3. Code Providerscan change code behavior or declare undeclared types and members. Use them to supplement your code with blocks which you might want to type manually. For instance, Create Event Trigger.

This section describes each Code Formatter in detail. The description includes the purpose of the Code Formatter, its availability and a usage example.

Expanded See Also

Is this topic helpful?​​​​​​​