如何替换自定义Windows Phone控件上的固定宽度和高度?

问题描述:

我想要显示像这三位控制:如何替换自定义Windows Phone控件上的固定宽度和高度?

enter image description here

我的问题是,我不希望有固定的“宽度”和“高度”为位图。他们必须把所有可用的空间放在原来的位置并保持其方面。

当我'与混合设计它,设计师总是把固定大小....

这里是我的代码:

<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> 

我怎么能这样做?感谢所有帮助

+0

你们是不是在XAML或代码更新呢?我很困惑你为什么说它是一个固定的高度。 –