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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:30:32+00:00 2026-05-27T20:30:32+00:00

I have a WPF Grid with a XAML similar to this: <Grid width=200 Height=200

  • 0

I have a WPF Grid with a XAML similar to this:

  <Grid width=200 Height=200 >

        <Grid.ColumnDefinitions >                             
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="2*" />
         </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"  />
            <RowDefinition Height="Auto"  />
            <RowDefinition Height="Auto" MinHeight="24" />
        </Grid.RowDefinitions>

      <TextBlock Text="Name" Grid.Row="0" Grid.Column="0"/>
      <TextBox Grid.Row="0" Grid.Column="1" />

      <TextBlock Text="Age" Grid.Row="1" Grid.Column="0"/>
      <TextBox Grid.Row="1" Grid.Column="1" />

  </Grid>

I need to add a new row in between existing 2 rows of data, but my worry is that when I add a new row, I will need to manually update Grid.Row attached property in each of the controls that appear in rows below the newly added row.

Is there a smarter way of doing this? may be to set Row/Column numbers relative to adjacent Rows/Columns ?

Cheers.

  • 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-27T20:30:33+00:00Added an answer on May 27, 2026 at 8:30 pm

    This problem has been addressed in the Visual Studio 2010 through the Design-Time Row and Column Manipulation Features.

    Not needed to manually update Row and Column numbers manually any more as this is taken care of by Visual Studio.

    Below demo illustrates this nicely.

    http://www.silverlight.net/learn/creating-ui/layout,-rendering,-and-panels/grid-control-design-time-row-and-column-manipulation-features

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

Sidebar

Related Questions

I have a grid in a XAML file in a WPF project. This MainGrid
I have been hiding a row in a WPF grid by setting the Height
I have application with WPF Ribbon and Grid. And I need to show this
I have to buil a rather complex WPF UI (a hughe Grid) in code
I have used a list view that uses a grid view in WPF. I
I have a WPF data grid and an xmlString and am having problems binding
I have the following simpl WPf grid, two columns, a button in each column,
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 use Extended WPF Toolkit BusyIndicator My Xaml <extToolkit:BusyIndicator Name=wait IsBusy=False Cursor=Wait Grid.ColumnSpan=3 Margin=10,10,10,10/>
I have the following WPF application <Window x:Class=Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:local=clr-namespace:WpfApplication1 Title=Window1 Height=300 Width=300>

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.