插入的图片被拉伸或缩小了,我想保持test.jpg的原始大小,应该怎样设置啊?请前辈指导!
背景:在Silverlight加载了一个子页,并插入了一幅图test.jpg。
问题:插入的图片被拉伸或缩小了,我想保持test.jpg的原始大小,应该怎样设置啊?(我的代码如下)
<Grid x:Name="LayoutRoot" Margin="1,1,1,1" Height="370" Width="654"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="273*" /> </Grid.RowDefinitions> <Grid.Background> <ImageBrush ImageSource="/test;component/Images/test.jpg" /> </Grid.Background> <TextBlock Grid.Row="2" Height="38" HorizontalAlignment="Left" Margin="175,10,0,0" Name="textBlockcoubiaoti" Text="{Binding CouName }" VerticalAlignment="Top" FontSize="26" Foreground="#FFFCF5F5" Width="111" /> <TextBlock Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="122,61,0,0" Name="textBlockcity" Text="{Binding CityName }" VerticalAlignment="Top" Width="61" /> <TextBlock Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="188,60,0,0" Name="textBlockcou" Text="{Binding CouName }" VerticalAlignment="Top" Width="61" /> </Grid>