diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Window.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Window.xaml
index 3c045231..e7119911 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Window.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Window.xaml
@@ -315,7 +315,7 @@
-
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
index f9114d09..f9cd7986 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
@@ -5037,7 +5037,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs b/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
index 7257403f..a75951a6 100644
--- a/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
@@ -1,6 +1,5 @@
using System;
using System.ComponentModel;
-using System.Diagnostics;
using System.IO;
using System.Windows;
using System.Windows.Controls;
@@ -952,29 +951,7 @@ public class ImageViewer : Control
private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- var self = (ImageViewer) d;
-
- if (e.NewValue is Uri uri)
- {
- self.ImageSource = GetBitmapFrame(uri);
- self.Init();
- }
- else
- {
- self.ImageSource = null;
- }
-
- static BitmapFrame GetBitmapFrame(Uri source)
- {
- try
- {
- return BitmapFrame.Create(source);
- }
- catch
- {
- return null;
- }
- }
+ ((ImageViewer) d).OnUriChanged((Uri) e.NewValue);
}
private void OnUriChanged(Uri newValue)
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Window.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Window.xaml
index 0deb0b91..ef4082c9 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Window.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Window.xaml
@@ -313,7 +313,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
index aa03a18a..04b36b5d 100644
--- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
@@ -5036,7 +5036,7 @@
-
+