Is there a RowSpan="All" in WPF?

Chris Spicer picture Chris Spicer · Jan 11, 2011 · Viewed 18.5k times · Source

I create a GridSplitter across the 3 rows that I have in my grid like this:

<GridSplitter Grid.Row="0" Grid.Column="1" Background="Yellow"
              HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
              Width="Auto" Height="Auto" ResizeDirection="Columns"
              Grid.RowSpan="3" ...

However, it's conceivable that I might add another row to my grid at a later stage, and I don't really want to go back and update all of my rowspans.

My first guess was Grid.RowSpan="*", but that doesn't compile.

Answer

user7116 picture user7116 · Jan 12, 2011

A simple solution:

<!-- RowSpan == Int32.MaxValue -->
<GridSplitter Grid.Row="0"
              Grid.Column="1"
              Grid.RowSpan="2147483647" />