Shamim Hafiz - MSFT
Shamim Hafiz - MSFT

Reputation: 22114

How to Resize Cells in WPF Grid

After constructing a Grid and adding Rows and Columns to it, how can modify the dimension of each Cell. I am not able to locate any property that would help me to achieve this.

As additional note, I am adding TextBlocks to each of the cell.

Upvotes: 0

Views: 860

Answers (2)

Damian Antonowicz
Damian Antonowicz

Reputation: 780

Do you want modify cells dimensions at runtime? If yes take a look at GridSplitter.

Upvotes: 2

TabbyCool
TabbyCool

Reputation: 2839

You can change the column width and row height within your ColumnDefinition and RowDefinition tags, or if you wish to have the cells in a less uniform arrangement you can set the ColumnSpan (might be ColSpan, it's been a while!) and RowSpan properties of each cell to create cells that span more than one row or column.

Upvotes: 2

Related Questions