Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Better code formatting rules for fluent interfaces and object initializers.

MpdreamzMpdreamz USMember

Fluent interfaces are very jumpy and I cannot control how they should behave in the editor.

expected behavior:


I cant control object initializers to put their opening bracket on the new line either.

Lastly it would be really cool if we could checkin the formatting rules as part of a project so that every developer formats the code the same without every developer having to dig through the code formatting window.


  • MpdreamzMpdreamz USMember

    I think part of the problem is that in the following peace of code:

    var mapResult = this._client.MapFluent<WorkOfArt>(m => m

    Xamarin will try align the .IndexName() method call to the first m of m => m which is never what you want.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Regarding your last point, formatting policies are always embedded in the solution, so all developers working on a solution have the same formatting settings. So you should make sure you edit the solution formatting settings - your preferences only apply to new projects.

    If there are formatting behaviours you can't achieve with the current formatting settings, please file a bug.

Sign In or Register to comment.