1

私は、ブラウザの中央にとどまりながら、ブラウザウィンドウのサイズが変更されたときに両側の空白を等しく減らす、Expression Blendのページ(Axml)を作成するために何時間も試みてきました。そして例はこのサイトまたはネット上で最もまともなサイトです。コード例またはリンクが大好きです。ありがとう

4

1 に答える 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 に答える