0

私は次のレイアウトを持っています:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="4" />
        <RowDefinition Height="20" MinHeight="20" MaxHeight="20" />
        <RowDefinition Height="auto" />
    </Grid.RowDefinitions>
    <TextBox Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    <GridSplitter Grid.Row="1" ResizeBehavior="PreviousAndNext" ResizeDirection="Rows" Background="Red" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
    <DockPanel Grid.Row="2" x:Name="toolbox" Background="Chocolate" />
    <TextBox Grid.Row="3" Height="50" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
</Grid>

行0と3の間でサイズを調整するグリッドスプリッターを作成するには?

4

3 に答える 3

0

これを試して:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <TextBox Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="SkyBlue" />
    <GridSplitter Grid.Row="1" Height="4" ResizeBehavior="PreviousAndNext" ResizeDirection="Rows" Background="Red" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
    <Grid Grid.Row="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <DockPanel Grid.Row="0" Height="20" x:Name="toolbox" Background="Chocolate" />
        <TextBox Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Green" />
    </Grid>
</Grid>
于 2012-07-27T08:12:26.703 に答える
0

これはどう

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <TextBox Grid.Row="0" Background="Blue"
             VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    <GridSplitter Grid.Row="1" Height="4" Background="Red"
                  ResizeBehavior="PreviousAndNext" ResizeDirection="Rows"
                  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    <DockPanel Grid.Row="2" Height="20" x:Name="toolbox" Background="Chocolate" />
    <TextBox Grid.Row="3" Background="Blue"
             VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
</Grid>
于 2012-07-27T08:18:14.330 に答える
0

グリッドにグリッドを配置します。

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBox Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
            <GridSplitter Grid.Row="1" Height="4" ResizeBehavior="PreviousAndNext" ResizeDirection="Rows" Background="Red" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
            <Grid Grid.Row="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <DockPanel Grid.Row="0" Height="20"/>
                <TextBox Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
            </Grid>
        </Grid>
于 2012-07-27T19:23:05.937 に答える