summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs')
-rw-r--r--Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs b/Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs
index 1c4036e0..686da587 100644
--- a/Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs
+++ b/Xamarin.Forms.Platform.WinRT/VisualElementPackager.cs
@@ -42,6 +42,8 @@ namespace Xamarin.Forms.Platform.WinRT
_columnSpan = columnSpan;
}
+ IElementController ElementController => _renderer.Element as IElementController;
+
public void Dispose()
{
if (_disposed)
@@ -66,7 +68,7 @@ namespace Xamarin.Forms.Platform.WinRT
_renderer.Element.ChildAdded += OnChildAdded;
_renderer.Element.ChildRemoved += OnChildRemoved;
- ReadOnlyCollection<Element> children = _renderer.Element.LogicalChildren;
+ ReadOnlyCollection<Element> children = ElementController.LogicalChildren;
for (var i = 0; i < children.Count; i++)
{
OnChildAdded(_renderer.Element, new ElementEventArgs(children[i]));
@@ -75,12 +77,12 @@ namespace Xamarin.Forms.Platform.WinRT
void EnsureZIndex()
{
- if (_renderer.Element.LogicalChildren.Count == 0)
+ if (ElementController.LogicalChildren.Count == 0)
return;
- for (var z = 0; z < _renderer.Element.LogicalChildren.Count; z++)
+ for (var z = 0; z < ElementController.LogicalChildren.Count; z++)
{
- var child = _renderer.Element.LogicalChildren[z] as VisualElement;
+ var child = ElementController.LogicalChildren[z] as VisualElement;
if (child == null)
continue;