Update GifImage.cs

This commit is contained in:
NaBian committed 2019-12-15 22:10:34 +08:00
1 parent 7289b3b65b
commit b0ff7e5b00
1 file changed
+10 -2
@@ -39,8 +39,16 @@ namespace HandyControl.Controls
private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (GifImage) d;
var v = (Uri)e.NewValue;
ctl.Source = new BitmapImage(v);
if (e.NewValue != null)
{
var v = (Uri)e.NewValue;
ctl.Source = new BitmapImage(v);
}
else
{
ctl.Source = null;
}
}
public Uri Uri