[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
  [Expand]Code Formatters
   Programming Style Rules
   Naming Conventions
  [Expand]Code Cleanup
   Remove Unused Assembly References
  [Collapse]Document Formatting (C#)
    General
    Blank Lines
    Braces
    Spacing
    Wrapping
    Other
   Document Formatting (XAML)
   Organize Members
   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)

Braces

The Braces page contains options which allow you to configure line breaks around and within the following code blocks:

  • Namespace
  • Type
  • Simple Method
  • Method
  • Property \ Indexer \ Event
  • Interface and Auto-Implemented Property
  • Simple Property \ Indexer \ Event
  • Accessor
  • Simple Accessor
  • Lambda Expression \ Anonymous Method
  • Statement

Each element has separate configuration options. You can set the following wrapping options:

  • How CodeRush should wrap open and close braces:

    • No wrap - does not add extra line breaks. This option removes existing line breaks if the Keep existing line breaks checkbox is not checked in the Editor | C# | Formatting | General options page.
    • Wrap if Long or Multiline - adds line breaks to wrap each expression element if the line exceeds the margin.
    • Simple Wrap - adds line breaks to wrap only those expression elements that exceed the margin.
    • Wrap - wraps all code elements regardless of the right margin.
  • The line break's position before or after a code element.

  • Align by - allows CodeRush to align braces to an element in the first line.

  • Align content by - allows you to specify how to align code blocks.

  • Indent - allows you to specify code lines' indentation.

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