Browse Source

Removed 'force' parameter from Measure.

pull/387/merge
Steven Kirk 10 years ago
parent
commit
72baba2f0e
  1. 6
      src/Perspex.Layout/ILayoutable.cs
  2. 8
      src/Perspex.Layout/Layoutable.cs

6
src/Perspex.Layout/ILayoutable.cs

@ -87,11 +87,7 @@ namespace Perspex.Layout
/// Carries out a measure of the control.
/// </summary>
/// <param name="availableSize">The available size for the control.</param>
/// <param name="force">
/// If true, the control will be measured even if <paramref name="availableSize"/> has not
/// changed from the last measure.
/// </param>
void Measure(Size availableSize, bool force = false);
void Measure(Size availableSize);
/// <summary>
/// Arranges the control and its children.

8
src/Perspex.Layout/Layoutable.cs

@ -306,18 +306,14 @@ namespace Perspex.Layout
/// Carries out a measure of the control.
/// </summary>
/// <param name="availableSize">The available size for the control.</param>
/// <param name="force">
/// If true, the control will be measured even if <paramref name="availableSize"/> has not
/// changed from the last measure.
/// </param>
public void Measure(Size availableSize, bool force = false)
public void Measure(Size availableSize)
{
if (double.IsNaN(availableSize.Width) || double.IsNaN(availableSize.Height))
{
throw new InvalidOperationException("Cannot call Measure using a size with NaN values.");
}
if (force || !IsMeasureValid || _previousMeasure != availableSize)
if (!IsMeasureValid || _previousMeasure != availableSize)
{
var previousDesiredSize = DesiredSize;
var desiredSize = default(Size);

Loading…
Cancel
Save