Stafford Williams
Stafford Williams

Reputation: 9806

WPF Datagrid - Re-sizable RowDetails

I have a need to make RowDetails inside a DataGrid re-sizable by the user (click & drag). I am only interested in the height being re-sizable. Is this possible?

Upvotes: 1

Views: 209

Answers (1)

brunnerh
brunnerh

Reputation: 185300

Use a gridsplitter in the DataTemplate for example:

<DataTemplate>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="3"/>
        </Grid.RowDefinitions>
        <!-- Content here -->
        <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch"
                  ResizeBehavior="PreviousAndCurrent" ResizeDirection="Rows"/>
    </Grid>
</DataTemplate>

Upvotes: 2

Related Questions