Redundancy

Attached properties

GammaXaml warns you about XAML attributes that have no meaning. For example, Grid.Row or DockPanel.Top are attached properties that do absolutely nothing if not placed on a child of a Grid or DockPanel, respectively. You can safely remove them to keep your code clean.

The standard AttachedPropertyBrowsableAttribute-derived attributes are used to identify these properties. Applying those on your own attached properties is all you need for GammaXaml to pick them up and notify you. In Silverlight, these attributes don't exist: Silverlight assemblies are externally annotated to provide this behavior.

RedundantAttribute.png

Empty collections

Specifying an empty collection in XAML is the same as not writing anything. GammaXaml detects this and offer to remove the redundant setter.

RedundantCollection.png

This feature correspond to RSRP-118457

Grid definitions

Specifying a single star-sized RowDefinition or ColumnDefinition is the same as not writing any definitions at all. GammaXaml notifies you about this to keep your XAML clean.

RedundantDefinitions.png

Last edited Jul 19, 2012 at 11:33 AM by MrJul, version 11

Comments

No comments yet.