Again, you should try not to add to the natural verbosity of XAML. Attributes such as Margin and Padding accept abbreviated values that apply in the order provided, symmetrically and logically. For instance, Margin="20" will be interpreted to mean a Thickness with all properties set to 20. Margin="20,50" will be interpreted to mean a Thickness with Left and Right set to 20, and Top and Bottom set to 50.
✘ <Button x:Name="closeButton"
Style="{DynamicResource CloseButtonStyle}"
Margin="4,4,4,4"
Padding="2,0,2,0"/>
✔ <Button x:Name="closeButton"
Style="{DynamicResource CloseButtonStyle}"
Margin="4"
Padding="2,0"/> |