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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:00:23+00:00 2026-06-10T20:00:23+00:00

I have a WPF Grid with four columns containing only one GridSplitter. Two of

  • 0

I have a WPF Grid with four columns containing only one GridSplitter. Two of the columns (0 and 3) are scalable, but one scalable column is not directly adjacent to the GridSplitter (column 2).

Columns 0 and 3 must have the same initial size. So I can’t put column 0 and 1 in a nested grid.

How can I solve this?

<Grid Height="40">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Rectangle Grid.Column="0" Fill="Blue" Margin="8" />
    <Rectangle Grid.Column="1" Fill="Yellow" Margin="8" Width="24" />
    <GridSplitter Grid.Column="2" Width="8" VerticalAlignment="Stretch" />
    <Rectangle Grid.Column="3" Fill="Red" Margin="8" />
</Grid>

Edit: I solved it with the help of nickolay.laptev

<Grid Height="40">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Rectangle Grid.Column="0" Fill="Blue" Margin="8" />
    <Rectangle Grid.Column="1" Fill="Yellow" Margin="8 8 16 8" Width="24" />
    <GridSplitter Grid.Column="1" Width="8" VerticalAlignment="Stretch" HorizontalAlignment="Right" ResizeBehavior="PreviousAndNext" />
    <Rectangle Grid.Column="2" Fill="Red" Margin="8" />
</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-10T20:00:25+00:00Added an answer on June 10, 2026 at 8:00 pm

    I offer 2 options:

    1. Don’t use single column for GridSplitter. Instead add it into column that is between resizable columns (2nd column in your case). You can place splitter inside column anywhere using horizontal alignment.
    2. Process columns resizing manually.
      If preview is enabled use GridSplitter.DragCompleted event. Change required columns width in it.
      If preview is disabled use another event with Preview prefix.

    It fixed my problem.

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

Sidebar

Related Questions

I have the following simpl WPf grid, two columns, a button in each column,
Say I have a very simple WPF grid (6 rows x 6 columns) defined
I have a WPF Toolkit DataGrid with one DataGridTemplateColumn. I've specified in a grid
I have following WPF ListView: <ListView Grid.Column=2 Grid.Row=1 Margin=0,53,12,6 Name=lvwProperties ItemsSource={Binding Path=SelectedPropertyItems, Mode=TwoWay} Grid.ColumnSpan=2>
I have WPF combobox bound to a ObservableCollection ItemCategoryList <ComboBox Grid.Column=1 Grid.Row=2 Height=Auto HorizontalAlignment=Stretch
So it's like this, I have a wpf binding <TextBox Name=txtRackNo Grid.Column=5 Grid.ColumnSpan=7 Grid.Row=4
I have some wpf gridviews(presenting only two here) <igDP:XamDataGrid x:Name=dgSummary GroupByAreaLocation=None ScrollingMode=Immediate HorizontalAlignment=Stretch VerticalAlignment=Stretch
I have a WPF textbox with a binding to the datacontext. <TextBox Grid.Column=1 Grid.Row=4
I have been hiding a row in a WPF grid by setting the Height
I have a WPF form which contains 30x30 grid where each grid cell 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.