Skip to content

Commit

Permalink
Visibility affects container if there is one (#6828)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow authored May 5, 2022
1 parent a42e2c6 commit d82da03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Core/src/Handlers/View/ViewHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Data.Common;
using System.Runtime.CompilerServices;
using Microsoft.Maui.Graphics;
#if __IOS__ || MACCATALYST
using PlatformView = UIKit.UIView;
Expand Down Expand Up @@ -192,7 +190,10 @@ public static void MapIsEnabled(IViewHandler handler, IView view)

public static void MapVisibility(IViewHandler handler, IView view)
{
((PlatformView?)handler.PlatformView)?.UpdateVisibility(view);
if (handler.HasContainer)
((PlatformView?)handler.ContainerView)?.UpdateVisibility(view);
else
((PlatformView?)handler.PlatformView)?.UpdateVisibility(view);
}

public static void MapBackground(IViewHandler handler, IView view)
Expand Down Expand Up @@ -220,7 +221,7 @@ public static void MapFlowDirection(IViewHandler handler, IView view)

public static void MapOpacity(IViewHandler handler, IView view)
{
if(handler.HasContainer)
if (handler.HasContainer)
((PlatformView?)handler.ContainerView)?.UpdateOpacity(view);
else
((PlatformView?)handler.PlatformView)?.UpdateOpacity(view);
Expand Down

0 comments on commit d82da03

Please sign in to comment.