Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 695721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:59:19+00:00 2026-05-14T02:59:19+00:00

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

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:59:19+00:00Added an answer on May 14, 2026 at 2:59 am

    Well changing the Margin on the style does change the spacing.

    I’m gonna guess that you have the above style in a resource and are expecting it to apply implicitly to all DataField instances. Silverlight 3 does not have support for implicit styles (the toolkit has some attached properties which can provide some semblence of implicit styles though).

    You need to reference this style from the DataForm:-

    <Grid.Resources>
      <Style x:Key="DataFieldStyle" TargetType="dataFormToolkit:DataField">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="MinHeight" Value="5"/>
      </Style>
    </Grid.Resources>
    <DataForm DataFieldStyle="{StaticResource DataFieldStyle}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a table on where I need a spacing between two rows <tr> of
I have a corollary question to This one. How can you change the spacing
change() function works and detects changes on form elements, but is there a way
I change schema.yml from time to time and execute: symfony propel:build-all-load but the lib/_model
In order to highlight spacing between Chinese characters I've got this code function replaceSpaces(){
I want to lessen the spacing between the ordinals and the content, i.e I
How to automatically change the space between the letters.I want the text to take
How do I change the character spacing in a WPF application within a textblock.
Hello I need to change this expression so it ignores white space preg_match(/([a-zA-Z\s]{2,}\,\s)+(RED|BLUE|GREEN|BLACK)$/i,$query, $matches))
I've got a pre-formatted report in Reporting Services 2005, and I need to change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.