summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/VisualElementPackager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/VisualElementPackager.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/VisualElementPackager.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/VisualElementPackager.cs b/Xamarin.Forms.Platform.iOS/VisualElementPackager.cs
index 1670176..fa91cf6 100644
--- a/Xamarin.Forms.Platform.iOS/VisualElementPackager.cs
+++ b/Xamarin.Forms.Platform.iOS/VisualElementPackager.cs
@@ -1,6 +1,11 @@
using System;
+#if __MOBILE__
namespace Xamarin.Forms.Platform.iOS
+#else
+
+namespace Xamarin.Forms.Platform.MacOS
+#endif
{
public class VisualElementPackager : IDisposable
{
@@ -13,7 +18,7 @@ namespace Xamarin.Forms.Platform.iOS
public VisualElementPackager(IVisualElementRenderer renderer)
{
if (renderer == null)
- throw new ArgumentNullException("renderer");
+ throw new ArgumentNullException(nameof(renderer));
Renderer = renderer;
renderer.ElementChanged += OnRendererElementChanged;
@@ -100,8 +105,9 @@ namespace Xamarin.Forms.Platform.iOS
continue;
var nativeControl = childRenderer.NativeView;
-
+#if __MOBILE__
Renderer.NativeView.BringSubviewToFront(nativeControl);
+#endif
nativeControl.Layer.ZPosition = z * 1000;
}
}