How do I change the spacing between fields in a DataForm in Silverlight?
I've tried editing the template but cannot find what I need.
I thought all I needed to do was change the MinHeight
and Margin
of the DataField
style, but that doesn't seem to do it.
<Style TargetType="dataFormToolkit:DataField">
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="MinHeight" Value="5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="dataFormToolkit:DataField">
<ContentControl x:Name="ContentControl" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Stretch" IsTabStop="False" VerticalAlignment="Center"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
I've found a number of articles about styling DataForm but many of them seem to be out of date. I don't see anything in the complete extracted template in Blend that corresponds to spacing.