我一直在尝试在表达式混合中创建一个页面(Axml),该页面位于浏览器的中心,但在调整浏览器窗口大小时同样减少了两边的空白。例如这个站点或网络上最体面的站点。喜欢代码示例或链接。谢谢
问问题
579 次
1 回答
1
发布此问题后,我立即解决了问题。最终在 Silverlight 中变得非常简单。我让自己很难受。
使您的网格与布局网格的大小相同,并删除用户控件的宽度和高度属性。
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SilverlightApplication2.Page"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
>
<Grid x:Name="LayoutRoot" Background="White" Width="597.5" Height="532">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="509" Margin="8.5,0,0,23" Width="579">
<Rectangle Height="65" Margin="0,8,0,0" VerticalAlignment="Top" Fill="#FFD64141" Stroke="#FF000000" HorizontalAlignment="Stretch"/>
</Grid>
</Grid>
</UserControl>
于 2009-06-25T02:08:05.983 回答