0

このウィンドウの Groupbox を引き伸ばしたい (高さ)。私はそれを働かせることができません。私は何を間違っていますか?私が欲しいのは、グループボックスがウィンドウの高さまで伸びることですが、最初の列は伸びません。

    <!-- PLAYER A -->
    <Border Grid.Row="0" Grid.Column="0" x:Name="PlayerA" Height="145" VerticalAlignment="Center">
        <Grid Height="145" VerticalAlignment="Top">
            <GroupBox x:Name="grpPlayerA" Header="Player A" Margin="10,14,0,0" RenderTransformOrigin="0.035,-0.717" Height="127" VerticalAlignment="Top">
                <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Label x:Name="lblArtistA" Content="VENGABOYS" HorizontalAlignment="Left" Margin="3,3,0,0" VerticalAlignment="Top"/>
                    <Label x:Name="lblTitleA" Content="TO BRAZIL" HorizontalAlignment="Left" Margin="3,27,0,0" VerticalAlignment="Top"/>
                    <ProgressBar x:Name="prgPlayerA" HorizontalAlignment="Left" Height="15" Margin="5,53,0,0" VerticalAlignment="Top" Width="212"/>
                    <Image x:Name="imgPlayerA" HorizontalAlignment="Left" Height="62" Margin="220,6,0,0" VerticalAlignment="Top" Width="81"/>
                    <Button x:Name="btnPlayerAPlay" Content="Play" HorizontalAlignment="Left" Margin="5,79,0,0" VerticalAlignment="Top" Width="75"/>
                    <Button x:Name="btnPlayerAPauze" Content="Pauze" HorizontalAlignment="Left" Margin="92,79,0,0" VerticalAlignment="Top" Width="74"/>
                    <Button x:Name="btnPlayerAStop" Content="Stop" HorizontalAlignment="Left" Margin="178,79,0,0" VerticalAlignment="Top" Width="76"/>

                </Grid>
            </GroupBox>

        </Grid>
    </Border>

    <!-- PLAYER B-->
    <Border Grid.Row="0" Grid.Column="1" x:Name="PlayerB">
        <GroupBox x:Name="grpPlayerB" Header="Player B" Margin="0,14,16,0" Height="127" VerticalAlignment="Top">
            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                <Label x:Name="lblArtistB" Content="VENGABOYS" HorizontalAlignment="Left" Margin="3,3,0,0" VerticalAlignment="Top"/>
                <Label x:Name="lblTitleB" Content="TO BRAZIL" HorizontalAlignment="Left" Margin="3,27,0,0" VerticalAlignment="Top"/>
                <ProgressBar x:Name="prgPlayerB" HorizontalAlignment="Left" Height="15" Margin="5,53,0,0" VerticalAlignment="Top" Width="212"/>
                <Image x:Name="imgPlayerB" HorizontalAlignment="Left" Height="62" Margin="220,6,0,0" VerticalAlignment="Top" Width="81"/>
                <Button x:Name="btnPlayerBPlay" Content="Play" HorizontalAlignment="Left" Margin="5,79,0,0" VerticalAlignment="Top" Width="75"/>
                <Button x:Name="btnPlayerBPauze" Content="Pauze" HorizontalAlignment="Left" Margin="92,79,0,0" VerticalAlignment="Top" Width="74"/>
                <Button x:Name="btnPlayerBStop" Content="Stop" HorizontalAlignment="Left" Margin="178,79,0,0" VerticalAlignment="Top" Width="76"/>

            </Grid>
        </GroupBox>
    </Border>

    <!-- HITLIJST -->
    <Border Grid.Row="1" Grid.Column="0" x:Name="Hitlijst" VerticalAlignment="Top" Margin="0,0,0,28">
        <Grid VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="0*"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <GroupBox x:Name="grpPlaylist" Header="Hitlijst" Margin="10,0" Grid.RowSpan="2" Height="275">
                <Grid VerticalAlignment="Top">
                    <ListBox x:Name="lbxHitlijst" Height="242" Margin="10,10,10,0" VerticalAlignment="Top">
                        <ListBoxItem Background="#FFF55F19" Content="1. Vengaboys - To Brazil (3:19)"/>
                        <ListBoxItem Background="#FFF91A1A" Content="2. Total Touch - Doo Be La Dee (3:60)"/>
                        <ListBoxItem Content="3. ATB - 9 PM Till I Come (3:33)"/>
                    </ListBox>

                </Grid>
            </GroupBox>

        </Grid>
    </Border>

    <Border Grid.Row="1" Grid.Column="1" x:Name="Info">
        <Grid>
            <GroupBox x:Name="grpInfo" Header="Info" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Height="282" Width="324">
                <Grid>
                    <TextBlock x:Name="txtLyrics" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="Lyrics" VerticalAlignment="Top" Height="119" Width="292"/>
                    <GroupBox x:Name="grpInfoInfo" Header="Gegevens" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Height="116" Width="292">
                        <Grid>
                            <Label x:Name="lblAlbum" Content="ALBUM: Hitzone 1" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.149,0.231"/>
                            <Label x:Name="lblYear" Content="JAAR: 1992" HorizontalAlignment="Left" Margin="10,36,0,0" VerticalAlignment="Top" RenderTransformOrigin="0,0.269"/>
                            <Label x:Name="lblArtists" Content="ARTIEST(EN): Vengaboys" HorizontalAlignment="Left" Margin="10,62,0,0" VerticalAlignment="Top"/>

                        </Grid>
                    </GroupBox>

                </Grid>
            </GroupBox>

        </Grid>
    </Border>
    <GroupBox x:Name="grpHitlijst" Header="Hitlijst --" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="0,0,10,10"/>
</Grid>

うまくいくといいですね、よろしくお願いします!

4

2 に答える 2

1

GroupBox の高さを伸ばしたい場合、なぜあなたのVerticalAlignment Top? に切り替えるとStretch、動作するはずです。

于 2013-02-04T10:36:00.223 に答える