int row = child.Row.Start;
int columnEnd = child.Column.End;
int rowEnd = child.Row.End;
- float l = hLocations[column] + Padding.Start + view.Margin.Start;
- float t = vLocations[row] + Padding.Top + view.Margin.Top;
+ float childLeft = hLocations[column] + Padding.Start + view.Margin.Start;
+ float childTop = vLocations[row] + Padding.Top + view.Margin.Top;
float width = hLocations[columnEnd] - hLocations[column] - ColumnSpacing - view.Margin.Start - view.Margin.End;
float height = vLocations[rowEnd] - vLocations[row] - RowSpacing - view.Margin.Top - view.Margin.Bottom;
bool needMeasuredWidth = false;
}
else
{
- l += (width - child.LayoutItem.MeasuredWidth.Size.AsDecimal()) * halign.ToFloat();
+ childLeft += (width - child.LayoutItem.MeasuredWidth.Size.AsDecimal()) * halign.ToFloat();
width = child.LayoutItem.MeasuredWidth.Size.AsDecimal();
}
}
else
{
- t += (height - child.LayoutItem.MeasuredHeight.Size.AsDecimal()) * valign.ToFloat();
+ childTop += (height - child.LayoutItem.MeasuredHeight.Size.AsDecimal()) * valign.ToFloat();
height = child.LayoutItem.MeasuredHeight.Size.AsDecimal();
}
}
}
- child.LayoutItem.Layout(new LayoutLength(l), new LayoutLength(t), new LayoutLength(l + width), new LayoutLength(t + height));
+ child.LayoutItem.Layout(new LayoutLength(childLeft), new LayoutLength(childTop), new LayoutLength(childLeft + width), new LayoutLength(childTop + height));
}
}
if (LayoutWithTransition)
{
- var win = Window.Get(Owner);
+ var currentWindow = Window.Get(Owner);
if (!childLayout.IsReplaceFlag())
{
- if (win == null)
+ if (currentWindow == null)
{
NUIApplication.GetDefaultWindow().LayoutController.AddToRemovalStack(childLayout);
}
else
{
- win.LayoutController.AddToRemovalStack(childLayout);
+ currentWindow.LayoutController.AddToRemovalStack(childLayout);
}
}
childLayout.ConditionForAnimation = childLayout.ConditionForAnimation | TransitionCondition.Remove;
// Add LayoutItem to the transition stack so can animate it out.
- if (win == null)
+ if (currentWindow == null)
{
NUIApplication.GetDefaultWindow().LayoutController.AddTransitionDataEntry(new LayoutData(layoutItem, ConditionForAnimation, 0, 0, 0, 0));
}
else
{
- win.LayoutController.AddTransitionDataEntry(new LayoutData(layoutItem, ConditionForAnimation, 0, 0, 0, 0));
+ currentWindow.LayoutController.AddTransitionDataEntry(new LayoutData(layoutItem, ConditionForAnimation, 0, 0, 0, 0));
}
}
{
return (Binding.BindableObject bindable, object value) =>
{
- int @enum = (int)value;
- return enumMin <= @enum && @enum <= enumMax;
+ int validEnum = (int)value;
+ return enumMin <= validEnum && validEnum <= enumMax;
};
}
}