• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 495
  • Last Modified:

how to add grid to control in wpf

I would loke to add grid in wpf to a control like panel or view or grid. as I create the grid dynamically and I want the grid to added to specific control so I would have space in the window to other control.
  • 2
1 Solution
dpatel_teamAuthor Commented:
Let me rephrase- I would like to know which control can have grid as a child
Easwaran ParamasivamCommented:
Even grid can be used as container. Please do check the link http://msdn.microsoft.com/en-us/library/bb514628(v=vs.90).aspx for other containers.
Any of the available container controls like Grid, StackPanel, WrapPanel, DockPanel, etc. can have other controls as their children. You can host your dynamically created grid in a cell of another grid or in a stackpanel or some other container. Which container control to choose depends on your screen layout requirement.

If you choose to add your dynamically created grid into some cell of another grid then other controls can be placed in remaining cells of the container grid.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now