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

  • Home
  • SEARCH
  • 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 358459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:18:05+00:00 2026-05-12T12:18:05+00:00

I have a grid in a XAML file in a WPF project. This MainGrid

  • 0

I have a grid in a XAML file in a WPF project. This MainGrid contains 3 columns into which I have placed another 3 grids.

If I arrange the MainGrid children in order 0,1,2 in the XAML e.g.

<Grid Grid.Column="0" Name="grid0"></Grid>
<Grid Grid.Column="1" Name="grid1"></Grid>
<Grid Grid.Column ="2" Name="grid2"></Grid>

then the grid2 remains null at runtime (in the MainWindow_Loaded event).

However, if I rearrange the order in the XAML file as below, then everything is not null and it works fine.

<Grid Grid.Column="1" Name="grid1"></Grid>
<Grid Grid.Column="2" Name="grid2"></Grid>
<Grid Grid.Column ="0" Name="grid0"></Grid>

Copying the code to a new project cannot reproduce the problem, and so it must be something to do with a setting in my current project. Does anyone have any ideas where I should look to determine what is behind this?

  • 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-12T12:18:06+00:00Added an answer on May 12, 2026 at 12:18 pm

    You could look in the files generated for your .xaml files. These are the .g.cs files in your obj directory. Perhaps comparing the non-working .g.cs file to a working one will give you a clue as to what is going on.

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

Sidebar

Related Questions

I have this strange issue where anytime I open a XAML file that contains
I have XAML file like this <UserControl x:Class=UISkripsi3.Sidebar 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 xmlns:UISkripsi3=clr-namespace:UISkripsi3 xmlns:local=clr-namespace:UISkripsi3>
I have a WPF project where I load a WindowsForsm assembly (dll file) dynamically
i have the following code to be implemented into my xaml file. <ItemsControl ItemsSource={Binding
I have a simple XAML file with a grid in it and textboxes. But
Don't have much to say, just can get into the event handler. XAML: <Grid>
I have created a WPF app where I dynamicly build XAML elements using c#
I hope this makes sense. I have created several WPF User Controls. The lowest
I have XAML File as below: <Window x:Class=ComboBoxCheck.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:check=clr-namespace:ComboBoxCheck Title=Window1 Height=300 Width=320>
I am trying to make a Facebook Client and I have XAML file like

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.