Browse Source

Fixed a bug in ProgressBar

pull/62/head
Nelson Carrillo 11 years ago
parent
commit
e8d5dae0b3
  1. 3
      Perspex.Controls/ProgressBar.cs

3
Perspex.Controls/ProgressBar.cs

@ -8,6 +8,7 @@ namespace Perspex.Controls
{
using Perspex.Controls.Primitives;
using Perspex.Controls.Templates;
using System;
/// <summary>
/// A control used to indicate the progress of an operation.
@ -21,7 +22,7 @@ namespace Perspex.Controls
var b = this.Bounds;
var indicator = this.GetTemplateChild<Border>("PART_Indicator");
indicator.Width = finalSize.Width * (this.Value / 100);
indicator.Width = Math.Max(this.Minimum, finalSize.Width * (this.Value / this.Maximum));
return size;
}

Loading…
Cancel
Save