首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

关于 WPF的IMAGE控件解决方法

2012-06-13 
关于 WPF的IMAGE控件这个控件怎么让他有图像 或者 他是做什么用的 不理解他[解决办法]显示图片,XML codeI

关于 WPF的IMAGE控件
这个控件怎么让他有图像 或者 他是做什么用的 不理解他

[解决办法]
显示图片,

XML code
<Image Width="200" Source="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water Lilies.jpg"/><Image Width="200">  <Image.Source>    <!-- To save significant application memory, set the DecodePixelWidth or       DecodePixelHeight of the BitmapImage value of the image source to the desired      height and width of the rendered image. If you don't do this, the application will      cache the image as though it were rendered as its normal size rather then just      the size that is displayed. -->    <!-- Note: In order to preserve aspect ratio, only set either DecodePixelWidth         or DecodePixelHeight but not both. -->    <BitmapImage DecodePixelWidth="200"       UriSource="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water Lilies.jpg" />  </Image.Source></Image>
[解决办法]
探讨

请教大虾~后台怎么赋值Source返回类型是ImageSource我定义BITMAP的对象不能赋值~

热点排行