我的演示應用程序顯示了兩個應該填滿整個瀏覽器屏幕的矩形。它們之間有一個垂直分離器。這看起來像一個基本的場景,但我不知道如何在xaml中實現它。我不能強制這個來填充整個屏幕,當移動分離器時,整個屏幕都會增長。任何人都可以幫忙嗎?移動時出現奇怪的分離器行爲
<UserControl
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
x:Class="SilverlightApplication1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
<Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Black" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MinWidth="50">
</Border>
<controls:GridSplitter Grid.Column="1" VerticalAlignment="Stretch" Width="Auto" ></controls:GridSplitter>
<Border BorderBrush="Blue" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2" MinWidth="50"></Border>
</Grid>
</UserControl>
heh,有趣的觀點:-) – tomo 2010-04-29 07:27:10
@tomo - 嘿,有趣的接受的答案 – 2010-06-10 05:23:07
是啊!避免治癒更好!在辦公室,我決定使用Telerik的分離器。內置SL分離器對我來說不存在! – tomo 2010-06-10 08:29:01