From d5218ee84ac5c10a364e85fec41c6fb2fcb9acce Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Fri, 16 Nov 2018 18:12:35 +0800
Subject: [PATCH] fixed a bug of imageviewer
---
HandyControl/Controls/ImageViewer.cs | 4 ++++
.../UserControl/Main/LeftMainContent.xaml | 2 +-
.../UserControl/Styles/NaiveTextBoxDemoCtl.xaml | 13 +++++++------
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/HandyControl/Controls/ImageViewer.cs b/HandyControl/Controls/ImageViewer.cs
index c319a5aa..e1bfc805 100644
--- a/HandyControl/Controls/ImageViewer.cs
+++ b/HandyControl/Controls/ImageViewer.cs
@@ -479,6 +479,10 @@ namespace HandyControl.Controls
{
ImageScale = ActualHeight / height;
}
+ else
+ {
+ ImageScale = 1;
+ }
ImageMargin = new Thickness((ActualWidth - ImageWidth) / 2, (ActualHeight - ImageHeight) / 2, 0, 0);
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index c9d56b88..3d89263f 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -55,7 +55,7 @@
-
+
diff --git a/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml
index ff5343aa..f06bb1d6 100644
--- a/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml
+++ b/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml
@@ -2,16 +2,17 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
+ xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
Background="{DynamicResource RegionBrush}">
-
-
+
+
-
-
-
-
+
+
+
+