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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:53:06+00:00 2026-05-31T08:53:06+00:00

i use a grid, that’s content will often be changed. in xaml it just

  • 0

i use a grid, that’s content will often be changed.
in xaml it just looks like this:

 <Grid Name="grid1"/>

In C# I do this:

private void informGrid()
{
   grid1= new Grid();
   grid1.Background = new SolidColorBrush(Colors.Transparent);
   grid1.Visibility = Visibility.Visible;

   Canvas.SetZIndex(grid1, 51);

   grid1.SetValue(Grid.RowProperty, 1);
   grid1.Margin = new Thickness(0, 0, 0, 0);

   grid1.RowDefinitions.Add(new RowDefinition { Height = new GridLength(hw) });
   grid1.RowDefinitions.Add(new RowDefinition { Height = new GridLength(hw) });

   grid1.ColumnDefinitions.Add(new ColumnDefinition{ Width=new GridLength(hw)});
   grid1.ColumnDefinitions.Add(new ColumnDefinition{ Width=new GridLength(hw)});
   grid1.ColumnDefinitions.Add(new ColumnDefinition{ Width=new GridLength(hw)});
   grid1.ColumnDefinitions.Add(new ColumnDefinition{ Width=new GridLength(hw)});
   grid1.ColumnDefinitions.Add(new ColumnDefinition{ Width=new GridLength(hw)});

   fillGrid();
}

And then I add 10 images into this grid, in each cell 1 (100% working).
the grid becomes visible, has the right row&columndefinitons, 10 children, but the pictures aren’t there.

i bet theres just a small mistake, but i wasn’t able to find it.

please help me.
thanks.

  • 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-31T08:53:07+00:00Added an answer on May 31, 2026 at 8:53 am

    used stackpanels instead, worked fine and you just have to clear the content

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

Sidebar

Related Questions

I'm using grid that looks like that: Html.Telerik().Grid(Model).Name(preciousGrid). ... bla bla bla.. .ClientEvents(events =>
I am trying to use the delegate method on a grid that I wrap
What grid library does swivel.com use? It looks pretty nice. Is it made inhouse?
I need to use a grid that allows for filtering in the column headers.
I trying to create grid that contains rows with the following structure: item name,
We have a set of ~10-15 windows desktops that we use for various grid
This may be obvious... How do I reference XAML elements later in that same
The WPF Grid has an IsMouseOver property that you can use in the Grid's
I have a grid that is currently using Telerik Grids, I would like to
i am having a concept like i want to use grid view inside another

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.