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

  • SEARCH
  • Home
  • 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 8808245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:34:26+00:00 2026-06-14T02:34:26+00:00

Please see the update I have the following WPF controls. <Grid> <Label Content=Report Generator

  • 0

Please see the update

I have the following WPF controls.

<Grid>
    <Label Content="Report Generator" Margin="0,0,0,294"/>
    <TextBox Name="FilePath" Width="300" Height="25" Margin="10,30,207,264"/>
    <Button Width="75" Click="Browse" Margin="335,30,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Height="25" Content="Browse" />
    <Button Width="75" Height="25" Click="Extract" Margin="432,30,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Content="Extract" />
    <ProgressBar x:Name="ExtractBar" Margin="10,70,107,204"/>
    <Label x:Name="FirstEntityCount" Content="Number of Type1 Entities: " Margin="0,191,0,98" />
    <Label x:Name="SecondEntityCount" Content="Number of Type2 Entities: " Margin="0,226,0,65" />
</Grid>

I’ve quickly thrown this together in Visual Studio 2012 designer. The target Framework is .Net 4.5 and this is a WPF Window. It’s an addition to an existing solution.

The issue is that if I don’t remove the 3rd and 4th margins (e.g. Margin=”a,b,c,d”, setting c and d to 0) and then specifying VerticalAlignment="Top" and HorizontalAlignment="Left" the controls are cropped.

See attached image below.Missing parts of controls

I can rectify this by setting the margins to be 0 and setting the alignments but I want to know why this happens by default? I literally have just dragged and dropped. The controls appear normal in Visual Studio 2012.

Running Windows 8 RTM.

UPDATE

My question isn’t why the margins now work and why the didn’t before (I get that they seem to be set so they crop the actual control itself); I’m merely asking why this complex IDE fluffs it all up… It’s happened over 2 rebuilds…
From what I remember, it also happens in Expression Blend. I’ll double check.

  • 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-06-14T02:34:27+00:00Added an answer on June 14, 2026 at 2:34 am

    When you drag and drop from the designer, whether it be in Visual Studio or Expression blend, the designer will attempt to place the element in the exact location the control was dropped on the designer surface. When the designer places the element, margins are used to position the control relative to the containing element.

    What is typically done when dragging controls onto the design surface is to reset the margins. In Blend and VS, you can reset any attribute to their default settings by clicking the little square in the properties and selecting reset.

    Agreed that the setting of the margins by the designer is a bit of an annoyance; though, not really sure of how else this would be handled when using a visual designer to drag and drop.

    Personally, I tend to switch between hand written XAML and the designer; lately, I’ve been using Blend much more since it can control the placement of nearly any element in the XAML by using the objects and timeline panel.

    On a side note, to clean up the Blend XAML madness, install the XAML Styler extension for Visual Studio.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do we update a textbox on ticking checkboxes? Please see the following code,
Update: Please see below; I have removed all abstraction and created a plain PHP
(Please see update at bottom) I've looked at dozens of questions and haven't been
Please look at : http://news.bbc.co.uk/2/hi/europe/8592380.stm The content updates automatically, however, I can't see it
Please see the following manifest. The Activity_1's primary objective has mapInfo refers to a
Please see my following code snippet. @Transactional public void saveMembersService(List<Member> list1, List<Member> list2) {
I have 2 related Linq to SQL questions. Please see the image below to
I have the following binding in my xaml, I can see the double value
I have the following script which creates 2 threads as you can see.The thing
I am very new in WPF. I have been trying to do the following:

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.