diff --git a/src/Core/src/Handlers/Layout/LayoutHandler.Gtk.cs b/src/Core/src/Handlers/Layout/LayoutHandler.Gtk.cs index b73aa582322d..349beb05ed8f 100644 --- a/src/Core/src/Handlers/Layout/LayoutHandler.Gtk.cs +++ b/src/Core/src/Handlers/Layout/LayoutHandler.Gtk.cs @@ -124,9 +124,21 @@ public override Size GetDesiredSize(double widthConstraint, double heightConstra #endif + private void UpdateVisibility(Visibility visibility) + { + if (visibility == Visibility.Visible) + PlatformView.Show(); + else + PlatformView.Hide(); + } + [MissingMapper] public void UpdateZIndex(IView view) => throw new NotImplementedException(); + static void MapVisibility(ILayoutHandler handler, ILayout layout) + { + ((LayoutHandler)handler).UpdateVisibility(layout.Visibility); + } } -} \ No newline at end of file +} diff --git a/src/Core/src/Handlers/Layout/LayoutHandler.cs b/src/Core/src/Handlers/Layout/LayoutHandler.cs index fae19d866735..6057f5bdcc1c 100644 --- a/src/Core/src/Handlers/Layout/LayoutHandler.cs +++ b/src/Core/src/Handlers/Layout/LayoutHandler.cs @@ -23,6 +23,9 @@ public partial class LayoutHandler : ILayoutHandler [nameof(ILayout.ClipsToBounds)] = MapClipsToBounds, #if ANDROID || WINDOWS [nameof(IView.InputTransparent)] = MapInputTransparent, +#endif +#if GTK + [nameof(IView.Visibility)] = MapVisibility, #endif };