今、私はWindows Phone 7のアプリケーションでgif画像を再生しています。このコードxmlを試しました
`xmlns:imagetools="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls" '
<phone:PhoneApplicationPage.Resources>
<imagetools:ImageConverter x:Key="ImageConverter" />
</phone:PhoneApplicationPage.Resources>
`<imagetools:AnimatedImage Source="{Binding ImageSource, Converter={StaticResource ImageConverter}}" /`>
とc#
try
{
ImageSource = new Uri("file:///C:/Users/sram.I-WAVES/Desktop/S&L_BB/Dice%20anim/dice_anim_1.gif", UriKind.RelativeOrAbsolute);
ImageTools.IO.Decoders.AddDecoder<ImageTools.IO.IImageDecoder>();
this.DataContext = this;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
しかし、「アセンブリ 'mscorlib、バージョン = 3.7.0.0 から 'System.Diagnostic.Contracts.ContractFailurekind' を読み込めませんでした。Culture=neutral,PublicKeyToken=969DB8053D3322AC'」のような例外がスローされます。この問題を解決する方法と、Windows Phone で gif 画像を再生するにはどうすればよいか教えてください。
前もって感謝します。