具有远程路径的 WPF 映像
本文关键字:WPF 映像 路径 程路径 | 更新日期: 2023-09-27 18:31:15
我正在尝试将图像加载到我的 Silverlight 项目中,并且我有以下 XAML:
<UserControl x:Class="SilverlightApplication1.MainPage"
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"
d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
<Grid x:Name="LayoutRoot" Background="White">
<Image Height="150" Width="200" Source="http://wsf.cdyne.com/WeatherWS/Images/rain.gif" />
</Grid>
</UserControl>
Silverlight 中的 Image 控件仅支持 PNG 和 JPEG,不支持 GIF。
http://msdn.microsoft.com/en-us/library/system.windows.controls.image(VS.95).aspx