diff --git a/SourceCode/SharedResources/Panuon.WPF.UI.Internal/Converters/ProgressBarBorderClipConverter.cs b/SourceCode/SharedResources/Panuon.WPF.UI.Internal/Converters/ProgressBarBorderClipConverter.cs index 39d7bf4f..14c7fe90 100644 --- a/SourceCode/SharedResources/Panuon.WPF.UI.Internal/Converters/ProgressBarBorderClipConverter.cs +++ b/SourceCode/SharedResources/Panuon.WPF.UI.Internal/Converters/ProgressBarBorderClipConverter.cs @@ -19,7 +19,6 @@ public override object Convert(object[] values, Type targetType, object paramete var direction = (ProgressDirection)values[5]; var orientation = (Orientation)values[6]; - var percent = (value - min) / (max - min); var rect = new Rect(); @@ -28,10 +27,10 @@ public override object Convert(object[] values, Type targetType, object paramete switch (direction) { case ProgressDirection.Normal: - rect = new Rect(0, 0, width * percent, height); + rect = new Rect(0, 0, Math.Max(0, width * percent), height); break; case ProgressDirection.Inverse: - rect = new Rect(width * (1 - percent), 0, width * percent, height); + rect = new Rect(width * (1 - percent), 0, Math.Max(0, width * percent), height); break; } } @@ -40,10 +39,10 @@ public override object Convert(object[] values, Type targetType, object paramete switch (direction) { case ProgressDirection.Normal: - rect = new Rect(0, height * (1 - percent), width, height * percent); + rect = new Rect(0, height * (1 - percent), width, Math.Max(0, height * percent)); break; case ProgressDirection.Inverse: - rect = new Rect(0, 0, width, height * percent); + rect = new Rect(0, 0, width, Math.Max(0, height * percent)); break; } } diff --git a/SourceCode/SharedResources/Panuon.WPF.UI/Properties/AssemblyInfo.cs b/SourceCode/SharedResources/Panuon.WPF.UI/Properties/AssemblyInfo.cs index bfee1742..a1bd57cc 100644 --- a/SourceCode/SharedResources/Panuon.WPF.UI/Properties/AssemblyInfo.cs +++ b/SourceCode/SharedResources/Panuon.WPF.UI/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ ResourceDictionaryLocation.SourceAssembly )] -[assembly: AssemblyVersion("1.2.1.1")] -[assembly: AssemblyFileVersion("1.2.1.1")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.1.2")] +[assembly: AssemblyFileVersion("1.2.1.2")] \ No newline at end of file