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
Fixed it myself...Or should i say SO saved my day again ??
Source
All i had to do is, select the image from the Solution explorer>Properties>Build action>changed 'None' to 'Resources'