TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
XAML Coding Standard
Search

ORG$004Checked automatically with code checker

Synopsis:Consider putting related properties on the same line
Language:XAML
Severity Level:1
Category:Organization and Layout


Description:

Some XAML properties naturally belong together. Examples of this are Width and Height, or HorizontalAlignment and VerticalAlignment. You should consider grouping these properties in such a way that they appear on the same line. Distributing related properties over multiple lines will make your XAML files unnecessarily long. As a counterpart, you should also consider putting nothing else on a line that has naturally related properties.

  <Button x:Name="cancelButton"
    Content="Cancel"
    Width="120" Height="38" HorizontalAlignment="Center"
    VerticalAlignment="Center"/>

  <Button x:Name="cancelButton"
    Content="Cancel"
    Width="120"
    Height="38"
    HorizontalAlignment="Center"
    VerticalAlignment="Center"/>

  <Button x:Name="cancelButton"
    Content="Cancel"
    Width="120" Height="38"
    HorizontalAlignment="Center" VerticalAlignment="Center"/>