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 9303541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:30:32+00:00 2026-06-18T23:30:32+00:00

I just started working with WPF and I am trying to set up a

  • 0

I just started working with WPF and I am trying to set up a grid with four rows that have a height of 150. That would take up 600 of my 800 pixels that I set for the height. I then set my top margin to 30 and my bottom margin to 170 to give myself some room for controls at the bottom.

Everything looks great in design view but when I run my applications the bottom row has some area cut off.

Design View
enter image description here

Running View
enter image description here

I don’t understand what is causing this discrepancy between these views.

 <Page x:Class="EzTargetProject.HomePage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
  mc:Ignorable="d" 
  d:DesignHeight="800" d:DesignWidth="1280"
Title="HomePage">

<Grid  Margin="20,30,20, 170" Grid.Column="4" Grid.Row="4" Background="Gray" ShowGridLines="True">
    <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
        <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="150"/>
        <RowDefinition Height="150"/>
        <RowDefinition Height="150"/>
        <RowDefinition Height="150"/>
    </Grid.RowDefinitions>

    <!-- Name -->
    <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical" />
</Grid>

  • 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-18T23:30:33+00:00Added an answer on June 18, 2026 at 11:30 pm

    You can avoid the bottom margin if you want to set the height of your grid.

    If you always want to have a 600px height grid, just set it.

    I’d use a ScrollViewer as a parent to let the user see the controls you are going to set under the grid (if the user wants to have a little window forexample):
    Enabling Scrollbar in WPF

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

Sidebar

Related Questions

I just started working using Google Maps API yesterday, and trying to set up
I just started working on Python and have been trying to run an outside
I just started working at a company that doesn't have any kind of source
I just started working in an environment that uses multiple programming languages, doesn't have
Just started working on a basic grid analysis algorithm in JavaScript but I have
I have just started working with crossfilter and d3.js ... I'm trying some snippets
Hi I have just started working with Highstock's javascript charts and was trying to
I just started working on a website that will help people understand what rappers
I just started working on an asp.net / C#.net application that is going to
I just started working on WebMatrix 2 recently, I've been reading that socket.io is

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.