试题详情
单项选择题 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that displays a high-resolution graphic image named Image1.jpg. You need to limit the width of the image to 200 pixels. You also need to preserve the aspect ratio of the image. Which code fragment should you use?()

A、 <Image Width="200" Source="Image1.jpg"/>   <Image Width="200" Height="200" Source="Image1.jpg"/>   <ImageWidth="200"><Image.Source>

B、 <BitmapImage DecodePixelWidth="200"DecodePixelHeight="200"UriSource="Image1.jpg" />   </Image.Source>

C、 </Image><Image Width="200"><Image.Source>

D、 <BitmapImage DecodePixelWidth="200" UriSource="Image1.jpg" /></Image.Source> </Image>

  • D
  • 关注下方微信公众号,在线模考后查看

热门试题