0

I want my stackpanel to display one or two rows, dependen on a bool value. I want it to fill for both if there is only one. how do I do that? - or should i use grid?

kfn
  • 620
  • 1
  • 7
  • 26

1 Answers1

0

You should use a grid for this. There is many ways you can do this on. You can make a grid with 2 rows then set heigt to *. Or you can do this in code when the bool is true create a new row.

Here is how you can add row/columns in code. programmatically add column & rows to WPF Datagrid

Community
  • 1
  • 1
Tan
  • 2,148
  • 3
  • 33
  • 54