views:

222

answers:

2

Just curious if the XAML editor is any better at auto-formatting and wrapping attributes in Visual Studio 2010.

Here's how the editor auto wraps attributes in VS 2008:

<StackPanel Grid.Row="0" Grid.ColumnSpan="3">
    <StackPanel Orientation="Horizontal">
        <TextBlock VerticalAlignment="Center" FontWeight="Bold"
Text="Current User:" />
        <ComboBox x:Name="_usersComboBox" Margin="5,0,0,0" Width="200"
ItemsSource="{Binding Users}" SelectedValuePath="Name"
SelectedValue="System Administration">
            <ComboBox.ItemTemplate>
                <DataTemplate>

Here's how I'd like the editor to auto wrap attributes:

<StackPanel Grid.Row="0" Grid.ColumnSpan="3">
    <StackPanel Orientation="Horizontal">
        <TextBlock VerticalAlignment="Center" FontWeight="Bold"
            Text="Current User:" />
        <ComboBox x:Name="_usersComboBox" Margin="5,0,0,0" Width="200"
            ItemsSource="{Binding Users}" SelectedValuePath="Name"
            SelectedValue="System Administration">
            <ComboBox.ItemTemplate>
                <DataTemplate>

Does VS 2010 grant my wish?

+3  A: 

Nope. You should open up a Connect for that:

https://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=3783&amp;FeedbackType=2

May not make it until SP1, but I've found them pretty responsive to suggestions during the B2 cycle. You might be surprised....

Will
Done: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=523960#details
DanM
+1 on that. I don't use wrapping for this reason.
Will
+3  A: 

There's something close to that.

The new editor in VS2010 supports an auto-indent word wrap mode. There is no way to activate it within the product, but a PM on our team wrote a quick extension that enables that mode. You can download it from the VS Gallery, or download it from the extension manager in VS2010 by searching for it by name ("word wrap" should be enough) or searching for Brittany Behrens, who wrote the extension.

Noah Richards
Thanks, Noah. I don't have VS 2010 yet, but I will definitely try this when I get it.
DanM