Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you insert a row/column in a WPF Grid?

Anyone have any suggestions on how to insert a row or column in a WPF Grid using (preferably) Visual Studio 2008?

It's no problem to add a new RowDefinition or ColumnDefinition, but I'm really not too excited about the prospect of incrementing the Grid.Row or Grid.Column for the large number of cells that are affected by the insertion. Has anyone come up with a clever way to automate this (perhaps with a regular expression find/replace operation)?

If this can't be done in Studio, can it be done in Blend?

like image 576
devuxer Avatar asked Nov 15 '22 14:11

devuxer


1 Answers

Use smaller size grids in your applications and then put those grids inside other grids, or try some of the WPF grid tools by Karl on WPF

VS2010 looks like it will have a better editor.

Blend is fairly good at inserting rows - when in design edit mode you can click the edge to add a row; Blend will then adjust your layout to look the same with the edited row. You will still need to manually move elements around the grid, but it should be less work overall.

like image 175
vanja. Avatar answered Dec 23 '22 07:12

vanja.