summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Layout.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-06-16 09:45:09 -0600
committerRui Marinho <me@ruimarinho.net>2016-06-16 16:45:09 +0100
commitd5be2f0144ca810fdfbf59808d526c26fe86017e (patch)
tree3ad7e4465307cd6d633184e05d85eb3a4df59e01 /Xamarin.Forms.Core/Layout.cs
parent04f7bd296ee67af9189ecd7fdfbd2808ca16ce9a (diff)
downloadxamarin-forms-d5be2f0144ca810fdfbf59808d526c26fe86017e.tar.gz
xamarin-forms-d5be2f0144ca810fdfbf59808d526c26fe86017e.tar.bz2
xamarin-forms-d5be2f0144ca810fdfbf59808d526c26fe86017e.zip
Prep Page for removal of InternalsVisibleTo (#150)
Diffstat (limited to 'Xamarin.Forms.Core/Layout.cs')
-rw-r--r--Xamarin.Forms.Core/Layout.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Xamarin.Forms.Core/Layout.cs b/Xamarin.Forms.Core/Layout.cs
index a98e46a1..8c0d1625 100644
--- a/Xamarin.Forms.Core/Layout.cs
+++ b/Xamarin.Forms.Core/Layout.cs
@@ -87,7 +87,7 @@ namespace Xamarin.Forms
internal ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
- internal override ReadOnlyCollection<Element> LogicalChildren
+ internal override ReadOnlyCollection<Element> LogicalChildrenInternal
{
get { return _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren)); }
}
@@ -211,10 +211,10 @@ namespace Xamarin.Forms
if (!ShouldLayoutChildren())
return;
- var oldBounds = new Rectangle[LogicalChildren.Count];
+ var oldBounds = new Rectangle[LogicalChildrenInternal.Count];
for (var index = 0; index < oldBounds.Length; index++)
{
- var c = (VisualElement)LogicalChildren[index];
+ var c = (VisualElement)LogicalChildrenInternal[index];
oldBounds[index] = c.Bounds;
}
@@ -231,7 +231,7 @@ namespace Xamarin.Forms
for (var i = 0; i < oldBounds.Length; i++)
{
Rectangle oldBound = oldBounds[i];
- Rectangle newBound = ((VisualElement)LogicalChildren[i]).Bounds;
+ Rectangle newBound = ((VisualElement)LogicalChildrenInternal[i]).Bounds;
if (oldBound != newBound)
{
EventHandler handler = LayoutChanged;
@@ -278,11 +278,11 @@ namespace Xamarin.Forms
internal virtual void OnChildMeasureInvalidated(VisualElement child, InvalidationTrigger trigger)
{
- ReadOnlyCollection<Element> children = LogicalChildren;
+ ReadOnlyCollection<Element> children = LogicalChildrenInternal;
int count = children.Count;
for (var index = 0; index < count; index++)
{
- var v = LogicalChildren[index] as VisualElement;
+ var v = LogicalChildrenInternal[index] as VisualElement;
if (v != null && v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent))
return;
}
@@ -417,7 +417,7 @@ namespace Xamarin.Forms
bool ShouldLayoutChildren()
{
- if (!LogicalChildren.Any() || Width <= 0 || Height <= 0 || !IsVisible || !IsNativeStateConsistent || DisableLayout)
+ if (!LogicalChildrenInternal.Any() || Width <= 0 || Height <= 0 || !IsVisible || !IsNativeStateConsistent || DisableLayout)
return false;
foreach (Element element in VisibleDescendants())