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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:25:05+00:00 2026-05-28T21:25:05+00:00

In this simple example, I have 5 GroupBox es, directly under a Grid .

  • 0

In this simple example, I have 5 GroupBoxes, directly under a Grid. I try to declare 1 column and 5 rows, so that they get stacked vertically. I didn’t use a StackPanel, as I want to be able to size these group boxes intelligently later on (I’d like the 4 first ones to be minimally sized, to let the last GroupBox take up all the space that is left).

As shown below, everything appears in the same “cell”. However, in the designer mode of Blend 4, it seems like my grid shows 5 cells (4 empty)… Removing rows and column declaration doesn’t change a thing.

Example

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Class="WpfControlLibrary1.MainControl"
    x:Name="MultiVol" MinHeight="520.12">

    <Grid>
        <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0.966"/>
                    <GradientStop Color="#FFD7D4FF"/>
                </LinearGradientBrush>
        </Grid.Background>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <GroupBox Margin="8,0" BorderBrush="#FF88B1D8">
            <GroupBox.Header>
                <WrapPanel>
                <Label Content="General" Background="#00000000" Foreground="#FF0033FF" FontWeight="Bold" FontFamily="/WpfControlLibrary1;component/Fonts/#Tahoma" />    
                </WrapPanel>
            </GroupBox.Header>

            <UniformGrid Columns="2">
                <Label Content="RICs" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Preference" />
                <UniformGrid VerticalAlignment="Center" Columns="2" Rows="1">
                    <RadioButton GroupName="preference" Content="Exotic" IsChecked="False" />
                    <RadioButton GroupName="preference" Content="Flow" IsChecked="True" />
                </UniformGrid>
                <Label Content="Live updates" />
                <CheckBox IsChecked="False" VerticalAlignment="Center"/>
            </UniformGrid>  
        </GroupBox>

        <GroupBox Margin="8,0" BorderBrush="#FF88B1D8">
            <GroupBox.Header>
                <WrapPanel>
                <CheckBox IsChecked="True" VerticalAlignment="Center" />
                <Label Content="Volatility" Background="#00000000" Foreground="#FF0033FF" FontWeight="Bold" FontFamily="/WpfControlLibrary1;component/Fonts/#Tahoma" /> 
                </WrapPanel>
            </GroupBox.Header>
            <UniformGrid Columns="2">
                <Label Content="Spots"></Label>
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Hist. references" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Tenors" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
            </UniformGrid>
        </GroupBox>

        <GroupBox  Margin="8,0" BorderBrush="#FF88B1D8">
            <GroupBox.Header>
                <WrapPanel>
                <CheckBox IsChecked="True" VerticalAlignment="Center" />
                <Label Content="Skew" Background="#00000000" Foreground="#FF0033FF" FontWeight="Bold" FontFamily="/WpfControlLibrary1;component/Fonts/#Tahoma" />   
                </WrapPanel>
            </GroupBox.Header>
            <UniformGrid Columns="2">
                <Label Content="Spot Intervals"></Label>
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Hist. references" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Tenors" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Compute 'Power'" />
                <CheckBox IsChecked="False" VerticalAlignment="Center"/>
            </UniformGrid>
        </GroupBox>

        <GroupBox Margin="8,0" BorderBrush="#FF88B1D8">
            <GroupBox.Header>
                <WrapPanel>
                <CheckBox IsChecked="True" VerticalAlignment="Center" />
                <Label Content="Term structure" Background="#00000000" Foreground="#FF0033FF" FontWeight="Bold" FontFamily="/WpfControlLibrary1;component/Fonts/#Tahoma" /> 
                </WrapPanel>
            </GroupBox.Header>
            <UniformGrid Columns="2">
                <Label Content="Spots" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
                <Label Content="Tenors" />
                <TextBox AcceptsReturn="False" AcceptsTab="True" AllowDrop="True" IsTabStop="True" />
            </UniformGrid>
        </GroupBox>

        <GroupBox Margin="8,0" BorderBrush="#FF88B1D8">
            <GroupBox.Header>
                <WrapPanel>
                <Label Content="Live updates" Background="#00000000" Foreground="#FF0033FF" FontWeight="Bold" FontFamily="/WpfControlLibrary1;component/Fonts/#Tahoma" />   
                </WrapPanel>
            </GroupBox.Header>
            <ListView MinHeight="100" Background="{x:Null}">
                <ListView.View>
                    <GridView AllowsColumnReorder="False">
                        <GridViewColumn Header="RIC" />
                        <GridViewColumn Header="Last tick" />
                    </GridView>
                </ListView.View>
            </ListView>
        </GroupBox>         
    </Grid>
</UserControl>
  • 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-28T21:25:05+00:00Added an answer on May 28, 2026 at 9:25 pm

    You need to specify the Grid.Row property of your GroupBox controls. The Grid won’t automatically align them. In your image, all of your controls are in the first grid row. Add the attached property Grid.Row="0" to each GroupBox to specify the row. Note that the row index is zero-based.

    Also, if you are wanting the last row to fill the remaining space, you will want to either set specific heights on the rest of the RowDefinitions, or set them all to auto (using Height="auto"). Using the latter will mean each row will size to it’s contents. Leaving the final RowDefinition as having no explicit height set will cause it to stretch and fill the remaining available space. Currently, since none of your RowDefinitions have a height set, they will all be sized equally within the available space.

    Here is a tutorial that explains how the layout of the Grid control works.

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

Sidebar

Related Questions

I have this very simple example that I am using to learn structs in
Say I have an entity that looks something like this simple example: MyEntity {
I have this simple example I can't seems to get working : MERGE INTO
Have a look a this simple example. I don't quite understand why o1 prints
Have a look at this very simple example WPF program: <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Take a very simple case as an example, say I have this URL: http://www.example.com/65167.html
i would like a simple help... i have a url like this: example.com/profile.php?id= &
I have a very simple page that is displaying canned data. I experienced this
Okay so basically : i have this simple example: main.cpp using namespace VHGO::Resource; std::list<BaseTable*>
I have been working on my Ruby. When trying to execute this simple example

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.