Resource

How to Resize WPF Grid Rows with a GridSplitter?

Soft Dev Resources Jun 10, 2009
Resize WPF Grid Rows using of Grid Splitter, by the help of Grid Splitter we can give the size to the rows.
  • 0
  • 0
  • 25877

The following code snippet adds a Grid splitter to a Grid that you can use to resize a Grid row.

<Grid Name="DynamicGrid" Width="466" Background="LightSteelBlue" ShowGridLines="True"

          Canvas.Top="119" Canvas.Left="8" Height="200">

      <Grid.ColumnDefinitions>

            <ColumnDefinition />

            <ColumnDefinition />

            <ColumnDefinition />

        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>

            <RowDefinition Height="50*" />

                <RowDefinition Height="Auto" />

                <RowDefinition Height="50*" />

            </Grid.RowDefinitions>

 

            <GridSplitter

                ResizeDirection="Rows"

                Grid.Column="0"

                Grid.ColumnSpan="10"

                Grid.Row="1"

                Width="Auto"

                Height="3"

                HorizontalAlignment="Stretch"

                VerticalAlignment="Stretch"

                Margin="0"

                Background="Green"/>

</Grid>

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

TOP RESOURCES

MOST LIKED RESOURCES