How do I change the spacing between fields in a DataForm?

Posted by Simon_Weaver on Stack Overflow See other posts from Stack Overflow or by Simon_Weaver
Published on 2010-03-27T04:18:50Z Indexed on 2010/03/27 4:23 UTC
Read the original article Hit count: 403

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about xaml