I am using this to display a gif in my app:
<Image Height="30" Width="30" gif:ImageBehavior.AnimatedSource="pack://application:,,,/OffPo diagnostic tool;component/resources/c1.gif" Grid.Column="1" Margin="394,110,42,22" Grid.Row="1" />
And it throws me this error :
Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.
My resource path is okay, even it shows the image in design time but fails to compile... What's wrong ?
SEMI-FIX
I used the exact path as the source:
C:\Users\nabil\Documents\Visual Studio 2015\Projects\OffPo Diagnostic Tool\OffPo Diagnostic Tool\resources\c1.gif
This fixed the problem but what if I move my application? Then the problem would occur again. Any permanent fix?
THIS IS WHAT I FOUND WHEN I TRIED INNEREXCEPTION
<xmlns:gif="http://wpfanimatedgif.codeplex.com">
part or is it only pseudo-code to define the source ofgif:ImageBehavior
? Same for the<Grid>
and</grid>
, I hope that's not your real code? – grek40</grid>
with lower case G doesn't match<Grid>
and giving a different error than yours) Also please describe how exactly is your image configured as resource? – grek40