1

次のように 3 つのビットマップを表示するコントロールを作成したいと思います。

ここに画像の説明を入力

私の問題は、ビットマップの「幅」と「高さ」を固定したくないことです。それらは、使用可能なすべてのスペースを使用して、側面を維持する必要があります。

Blendでデザインしていると、デザイナーはいつも固定サイズを入れて…。

これが私のコードです:

<UserControl x:Class=""
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
>

<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">
    <Image HorizontalAlignment="Left" Height="203" Margin="53,30,0,0" VerticalAlignment="Top" Source="/FakeData/Images/lavieestbelle.jpg" RenderTransformOrigin="0.5,0.5" Width="144" UseLayoutRounding="False" d:LayoutRounding="Auto">
            <Image.RenderTransform>
                <CompositeTransform Rotation="-15"/>
            </Image.RenderTransform>
        </Image>
        <Image HorizontalAlignment="Left" Height="203" Margin="88,30,0,0" VerticalAlignment="Top" Source="/FakeData/Images/lavieestbelle.jpg" Width="144"/>
        <Image HorizontalAlignment="Left" Height="203" Margin="132.951,34.5,0,0" VerticalAlignment="Top" Source="/FakeData/Images/lavieestbelle.jpg" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Width="144">
            <Image.RenderTransform>
                <CompositeTransform Rotation="15"/>
            </Image.RenderTransform>
        </Image>
</Grid>

どうやってやるの ?助けてくれてありがとう

4

1 に答える 1