Forum Visual Studio

Hi, What C# Formatting option controls this behaviour?


I'm a new Xamarin Studio user (was using Unity's build-in Monodevelop until 2 days ago). I like my braces on new lines:

if( something )

However the IDE insists I put braces on the same line as the if. Here's what it's doing:
1) I'm about to hit ENTER and start a curly brace:
2) So far so good:
3) I hit ENTER and try to enter my closing brace. The IDE then auto snaps my starting brace back to the end of the if() line:

Why is it doing that and can I change it so it doesn't modify my starting brace?

My C# formatting options are:
New Lines:

Thanks in advance,


  • mhutchmhutch USMember, Xamarin Team Xamurai

    Did you set the formatting policy in preferences or on the solution? When you create a solution, the policies are copied into the solution, so everyone working on a solution gets the same policies.

  • JChowdownJChowdown USMember

    Hi Michael,

    I'm doing it through this: Preferences -> Source_Code > Code_Formatting -> C#_Source_File

Sign In or Register to comment.