WPF (사용자 정의 윈도우)에서 프로젝트를 수행하고 있습니다. 그래서 저는 한 가지 질문에 직면하고 있습니다. 메인 윈도우에는 테두리, 도킹 패널 및 2 개의 격자가 있습니다. 그것은 수직 애플 리케이션이며 사용자는 하단에서 응용 프로그램을 스트레칭해야합니다. 어떻게 내가 높이 및 사용자 내에서 배경 그림을 변경하려면 격자를 만들 수 있죠 s stretching?[enter image description here][1] For example, from 270x1 to 270x330 by simple dragging the bottom to the down.[enter image description here][1]
사용자의 스트레칭 내에서 그리드의 높이와 배경 그림을 변경하려면 어떻게해야합니까?
<Grid Width="270" Margin="4,2,0.5,0" Height="588" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="auto" MinHeight="30"/>
<RowDefinition Height="auto" MinHeight="558"/>
</Grid.RowDefinitions>
<Grid.Background>
<ImageBrush/>
</Grid.Background>
<Border x:Name="MainBorder" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="270" Grid.RowSpan="2" MouseLeftButtonDown="MainBorder_MouseLeftButtonDown">
<Border.Background>
<ImageBrush ImageSource="atopbg.png"/>
</Border.Background>
</Border>
<Button x:Name="buttonclose" Content="" HorizontalAlignment="Left" Margin="243,10,0,0" VerticalAlignment="Top" Width="18" Height="18" Click="buttonclose_Click" BorderBrush="#FFDEECF2">
<Button.Background>
<ImageBrush ImageSource="close.png"/>
</Button.Background>
</Button>
<Button x:Name="buttonhide" Content="" HorizontalAlignment="Left" Margin="220,10,0,0" VerticalAlignment="Top" Width="18" Height="18" Click="buttonhide_Click" BorderBrush="#FFE6EDF1">
<Button.Background>
<ImageBrush ImageSource="collapse.png"/>
</Button.Background>
</Button>
<Button x:Name="buttonsettings" HorizontalAlignment="Left" Margin="197,10,0,0" VerticalAlignment="Top" Width="18" Height="18" BorderBrush="#FFEBF0F3" Click="buttonsettings_Click">
<Button.Background>
<ImageBrush ImageSource="settings.png"/>
</Button.Background>
</Button>
<Label x:Name="label" HorizontalAlignment="Left" Margin="172,46,0,0" VerticalAlignment="Top" Grid.Row="1" Height="10" Width="10">
<Label.Background>
<ImageBrush/>
</Label.Background>
</Label>
<Label x:Name="label1" Content="" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="84" Height="29">
<Label.Background>
<ImageBrush ImageSource="logo.png"/>
</Label.Background>
</Label>
<Grid HorizontalAlignment="Left" Height="86" Margin="0,472,0,0" VerticalAlignment="Top" Width="270" Grid.Row="1">
<Grid.Background>
<ImageBrush ImageSource="botbg.png" Stretch="Uniform"/>
</Grid.Background>
</Grid>
<DockPanel HorizontalAlignment="Left" Height="140" Margin="0,2,0,0" Grid.Row="1" VerticalAlignment="Top" Width="270">
<DockPanel.Background>
<ImageBrush ImageSource="btopbg.png"/>
</DockPanel.Background>
</DockPanel>
<GridSplitter x:Name="gridSplitter" HorizontalAlignment="Left" Height="330" Margin="0,142,0,0" Grid.Row="1" VerticalAlignment="Top" Width="270" ResizeDirection="Rows" DragDelta="gridSplitter_DragDelta" ResizeBehavior="PreviousAndCurrent">
<GridSplitter.Background>
<ImageBrush ImageSource="midbg.png"/>
</GridSplitter.Background>
</GridSplitter>
</Grid>
`
PS 그것은`내 첫 심각한 프로젝트 : 첫째 3
우리는 당신을 돕기 위해 귀하의 코드를 볼 수 있어야합니다! 'HorizontalAlignement' 및/또는'VerticalAlignement'를'strecth'로 설정하려고 했습니까? – Sidewinder94
당신에게 xaml을 보여주세요. 선착장과 격자를 어떻게 구조화하는지 시각화 할 수 없습니다. – Jai