Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF: Is it possible to do a row/column span in UniformGrid?

Is it possible to do a row/column span in UniformGrid? Using Grid attached properties

Grid.RowSpan

and

Grid.ColumnSpan

doesn't work on UniformGrid.

like image 823
matori82 Avatar asked May 15 '12 14:05

matori82


People also ask

What is UniformGrid in WPF?

The UniformGrid control is a responsive layout control which arranges items in a evenly-spaced set of rows or columns to fill the total available display space. Each cell in the grid, by default, will be the same size.

What is Grid ColumnSpan in WPF?

WPF Grid panel enables you to arrange children elements in cells defined by rows and columns. In the code example of this article, we will learn Grid layout and its properties in WPF using C# and XAML.

What is grid RowSpan?

You can span across multiple rows and columns using the Grid. RowSpan and Grid. ColumnSpan attached properties. The default value for both these properties is 1. The Grid will attempt to assign as many row spans or column spans as it can up to the amount specified by the Grid.


1 Answers

No. There are no attached properties that will allow you to do that.

You could create a subclass of the UniformGrid and add them but you would have to handle all the arranging of the child controls.

It will be pretty hard to define what should happen to elements that span multiple columns when they have to wrap to the next line.

like image 88
Emond Avatar answered Oct 17 '22 22:10

Emond