From the course: Windows Presentation Foundation: 2 Layout

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Work with grid column and row sizes

Work with grid column and row sizes

From the course: Windows Presentation Foundation: 2 Layout

Start my 1-month free trial

Work with grid column and row sizes

- [Instructor] You have control over the size of your rows and the size of the columns in the grid. Here's my example. I'm working with this grid. It has three rows defined and it has three columns defined. To set the row size you use what's called the height property. And to set the column size use the width property. Now, everything I'm showing you will be in the columns, but all the principles I'm talking about will also apply to row definitions. Right now, I haven't specified any width for the column definition. So, I'm using the default which is called Star Size or propotional sizing, and that means that each of the three columns is in proportion to the other two columns. They're all the same width. I can control over the width property by typing in a new value here and I'll start by showing the fixed size. So, I'll type in 60 and that's pixels, and so this is 60 pixels wide, and you'll notice that all three elements that are in column zero are now 60 pixels wide and you can if…

Contents