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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:39:20+00:00 2026-05-30T23:39:20+00:00

I have a WPF project in C# I am working on. I have a

  • 0

I have a WPF project in C# I am working on. I have a TabPage that contains three controls on it: 2 textboxes and a datagridview. I want to have all three fit onto the page based on the size of the parent (the tabpage it is located on).

One textbox should be along the right side (ending at the other textbox), and the last text box along the full bottom.

GRID | TEXTBOX1

— TEXTBOX —

I have been experimenting with the Docking and Anchoring styles but I’m not sure how to use them properly with multiple elements on the page.

Currently I have the Textbox1 Dock.Right, Textbox2 Dock.Bottom. I want the remaining DataGridView to fill whatever space is left. However, using the Dock.Fill just fills the whole parent form and overlaps the textboxes.

Am I going about this properly? I saw something on DockPanel’s which had a “LastChildFill” property, but it didn’t seem to apply to me (could be wrong?). Thanks in advance!

  • 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-30T23:39:21+00:00Added an answer on May 30, 2026 at 11:39 pm

    Just use Grids.

    e.g. one Grid with two rows, top row containing another Grid with two columns.

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition /> <!-- Fill All -->
            <RowDefinition Height="Auto" /> <!-- Fit to content -->
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <DataGrid Grid.Column="0" />
            <TextBox Grid.Column="1" />
        </Grid>
        <TextBox Grid.Row="1" />
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project I'm working on that requires our WPF application read SMS
I have a WPF C# project that I am working on and I have
I'm working on a solution where I have a WPF project that is using
I'm working with a project that is WPF and VB.net. I want to visually
I have been working on a C# 4.0 WPF project and need to figure
I have a scene in my WPF project with about 2000 different user controls:
I am working on a TcpClient Asynchronous requesting WPF project. In which I have
I have built a Wpf-ControLibrary-Project to put some Controls there. In one Control i
I am currently working on a wpf project in C#. I have a treeview
I am working on a project where I have implemented MVVM for WPF desktop

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.