임 ...이 화면 회색에 는 상태 표시가 고정되어 있지만 그리드 메뉴는 모든 구성 요소가 캔버스에 없습니다. 이 당신은 이런 일이 Canvas
에 가고 싶지 않아 XAMLWPF 및 XAML 문제 WPF & XAML 내가 고정하는 방법을 고정하는 방법을 잘 모릅니다 의 새로운
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="WpfApplication6.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="640" Height="480">
<Grid x:Name="LayoutRoot">
<Canvas>
<StackPanel Height="40" Width="624" VerticalAlignment="Top" HorizontalAlignment="Center">
<Menu Height="39" Margin="1,0,0,0">
<Menu.Background>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFF6F6F6" Offset="0.25"/>
<GradientStop Color="#FFEAE8E8" Offset="0.25"/>
<GradientStop Color="#FFDCD9D9" Offset="0.8"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Menu.Background>
</Menu>
</StackPanel>
<StackPanel Height="356" Canvas.Top="44" Width="161" HorizontalAlignment="Left">
<Expander Header="Expander" Height="107">
<Grid Background="#FFE5E5E5"/>
</Expander>
</StackPanel>
<StackPanel Height="360" Canvas.Left="161" Canvas.Top="40" Width="463">
<DataGrid Height="361"/>
</StackPanel>
</Canvas>
<StackPanel Height="40" Margin="-1,0,0,0" VerticalAlignment="Bottom">
<StatusBar Height="40" Background="#FF897676"/>
</StackPanel>
</Grid>
귀하의 질문에 대한 확신이 없습니다. 그리드와 메뉴를 화면의 어디에 위치 시키길 원합니까? – ChrisNel52