0

我正在使用 Windows Phone 7 应用程序,它在 HyperlinkBut​​ton 中加载图像。这很好用,除了Stretch="Uniform"在图像不是完全正方形时会在图像周围放置空白区域。有没有办法让这个透明?

图像周围的空白区域

<HyperlinkButton NavigateUri="{Binding Id, StringFormat='{}/x;component/Pages/FullScreenImage.xaml?id={0}'}"
                    Grid.Column="0" Grid.Row="0"
                    toolkit:TiltEffect.IsTiltEnabled="True" Background="Transparent">
    <HyperlinkButton.Template>
        <ControlTemplate TargetType="HyperlinkButton">
            <Grid Margin="0,0,0,10" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Column="0"
                    Grid.Row="0"
                    Text="Advertised"
                    Margin="10,0,0,0"
                    Style="{StaticResource PhoneTextSubtleStyle}" />
                <Image Grid.Column="0"
                    Grid.Row="1"
                    Margin="0"
                    Stretch="Uniform" 
                    Source="{Binding ExpectedImage}"  />
            </Grid>
        </ControlTemplate>
    </HyperlinkButton.Template>
</HyperlinkButton>
4

1 回答 1

0

我的图像源正在创建白色。:-/

于 2012-05-16T20:21:39.110 回答