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
+8
@@ -39,9 +39,17 @@ namespace HandyControl.Controls
private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{ {
var ctl = (GifImage) d; var ctl = (GifImage) d;
if (e.NewValue != null)
{
var v = (Uri)e.NewValue; var v = (Uri)e.NewValue;
ctl.Source = new BitmapImage(v); ctl.Source = new BitmapImage(v);
} }
else
{
ctl.Source = null;
}
}
public Uri Uri public Uri Uri
{ {