Bug Report T567015
Visible to All Users

Code Formatting - XAML Formatting - Attributes aren't sorted correctly when attached properties are used

created 7 years ago (modified 7 years ago)

[DevExpress Support Team: CLONED FROM T566780: XAML Styling inconsistent/surprising and cannot be configured]
Oh neat, I didn't notice the Advanced tab over there, thanks!

Code
<Label Grid.Row="2" Grid.Column="1" local:Test.PropertyB="2" Content="Text" local:Test.PropertyA="1"/>

For Attribute order, I have the following:

C#
x:Class xmlns, xmlns:x xmlns:* x:Key, Key, x:Name, Name, x:Uid, Uid, Title Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex *:*, * PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText Storyboard.*, From, To, Duration

That is a 1:1 copy from XamlStyler (which looked similar, so I just copied them over without changing anything).
I can reproduce that in a newly created WPF project that has a simple Test class with two attached properties added (simple expansion of the Visual Studio Snippet propa with names that make the ordering obvious).

Let me know if you need anything else here.

Comments (1)
AE AE
Alex Eg (DevExpress) 7 years ago

    Hi Emanuel,
    Thank you for providing the settings. I see that CRR formatting differs from the XAML Styler's formatting and we are researching the issue. Thank you for your patience.

    Answers approved by DevExpress Support

    created 7 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.