내 Shell.xaml에서 두 개의 모듈이 각각 높이의 절반을 차지하고 확장 가능하도록하고 싶습니다. 왜 첫 번째 모듈이 차단됩니까?내 모듈이 내 Shell.xaml의 전체 DockPanel을 채우지 않는 이유는 무엇입니까?
alt text http://i30.tinypic.com/2cr5zx0.png
쉘 :
<Window x:Class="HelloWorld.Desktop.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.codeplex.com/CompositeWPF"
Height="300"
Width="300"
Title="Hello World" >
<DockPanel LastChildFill="True">
<ContentControl Name="MainRegion"
DockPanel.Dock="Top"
cal:RegionManager.RegionName="MainRegion"/>
<ContentControl
Name="SecondRegion"
DockPanel.Dock="Top"
cal:RegionManager.RegionName="SecondRegion"/>
</DockPanel>
</Window>
HelloWorldView :
<UserControl x:Class="HelloWorldModule.Views.HelloWorldView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel
Background="Tan">
<TextBlock Text="Hello World View"
Foreground="Brown"
Margin="10 10 10 0"
FontSize="14"/>
<TextBlock Name="DisplayArea"
Margin="10 10 10 0" Text="(default text)" TextWrapping="Wrap"/>
</StackPanel>
</UserControl>
SecondView :
<UserControl x:Class="SecondModule.Views.SecondView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel
Background="Orange">
<TextBlock Text="Second View"
Foreground="Brown"
Margin="10 10 10 0"
FontSize="14"/>
<TextBox Name="Message"
Margin="10 10 10 0" Text="skfddsf" TextChanged="TextBox_TextChanged"/>
</StackPanel>
</UserControl>
Height = "5 *"의 5는 실제로 필요하지 않습니다. 두 행에서 *를 사용하십시오. – Carlo