locked
Position first attribute on same line as start tag not available in Visual Studio 2012 RC RRS feed

  • Question

  • Hi,

    I've just installed the Visual Studio 2012 RC and noticed that the xaml formatting options enabling to Position first attribute on same line as start tag is no longer listed under the Position each attribute on a separate line option. This is very annoying for us since we have a lot of xaml files that have been created using this formatting.

    Does anyone encountered the same issue?

    Is it a bug in Visual Studio 2012 RC (I can't imaging why would Microsoft wants to remove this option)?

    Is there a way to use this option without using the Visual Studio option dialog?

    Thanks


    Frank_9

    Monday, June 4, 2012 4:05 PM

All replies

  • Hi Frank-9,

    Thank you for your post.

    This thread is helpful to you:http://social.msdn.microsoft.com/Forums/en/vseditor/thread/fb75ba2e-237a-4685-a51c-3eee31e1ef39

    Best regards,

    Ego

    Tuesday, June 5, 2012 7:39 AM
  • Hi Ego,

    Thank for your answer. Indeed there is an option to position each attribute on a separate line like this:

    <TextBlock 
        Text="hello" 
        TextWrapping="Wrap" 
        FontWeight="Black" />

    What I really want (that was possible in VS 2010 and VS 2011 Beta but seems to have disappear in VS 2011 RC) is the option to position first attribute on the same line as start tag like this:

    <TextBlock Text="hello" 
               TextWrapping="Wrap" 
               FontWeight="Black" />

    Thanks 

    Frank_9



    • Edited by Frank_9 Tuesday, June 5, 2012 1:46 PM
    Tuesday, June 5, 2012 1:46 PM
  • YES! This option is a MUST! We also have MANY xaml files which were created using the "position first attribute on same line as start tag" option.

    Why was this removed from VS 2012 RC? It makes no sense. No sense at all!

    Here a screen cap of the option as seen in VS 2010:

    Even the MSDN help documentation (granted, also beta) references it:
    http://msdn.microsoft.com/en-us/library/bb763100(v=vs.110).aspx

    VS 2010 stored the reference via:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\XamlEditor
    with the string key KeepFirstAttributeOnSameLine Value=True

    Adding the same key to the equivalent VS 2012 registry has no affect. :-(

    • Edited by MBursill Tuesday, June 5, 2012 11:11 PM
    • Proposed as answer by Ego Jiang Monday, June 25, 2012 5:47 AM
    • Unproposed as answer by Ego Jiang Monday, June 25, 2012 6:53 AM
    Tuesday, June 5, 2012 11:02 PM
  • This is a baffling removal. Apart from being an awful way to format Xml/Xaml, it results in real problems comparing between versions as there are so many changes caused by the new formatting.
    Friday, June 8, 2012 1:39 PM
  • My post should NOT be the proposed answer. It doesn't answer anything. I point out in detail that the much needed "position first attribute...." feature is now missing, and that there is no obvious or hidden way to turn it back on. The real question is "why is it missing"?
    Monday, June 25, 2012 6:34 AM
  • I've run into this problem too. I can't imagine why MS would remove this formatting option. The nearest equivalent ("Position each attribute on a separate line" without the missing "Position first attribute on same line as start tag") makes the XAML very difficult to read.

    I've written this up as a bug in Connect, if anyone wants to vote it up: https://connect.microsoft.com/VisualStudio/Feedback/details/751919

    Sunday, July 1, 2012 2:40 PM
  • I would like to add to the corus my view that removing "Position first attribute on same line as start tag" was a large mistake.

    Note I see where it is supposed to be changed in the release version, yea!


    John J. Hughes II

    Tuesday, July 31, 2012 3:06 PM