diff --git a/samples/CommunityToolkit.Maui.Sample/Models/PopupSize.cs b/samples/CommunityToolkit.Maui.Sample/Models/PopupSize.cs index b8e21cebfe..88cef5a44d 100644 --- a/samples/CommunityToolkit.Maui.Sample/Models/PopupSize.cs +++ b/samples/CommunityToolkit.Maui.Sample/Models/PopupSize.cs @@ -6,8 +6,8 @@ public PopupSizeConstants(IDeviceDisplay deviceDisplay) { Tiny = new(100, 100); Small = new(300, 300); - Medium = new(0.7 * (deviceDisplay.MainDisplayInfo.Width / deviceDisplay.MainDisplayInfo.Density), 0.6 * (deviceDisplay.MainDisplayInfo.Height / deviceDisplay.MainDisplayInfo.Density)); - Large = new(0.9 * (deviceDisplay.MainDisplayInfo.Width / deviceDisplay.MainDisplayInfo.Density), 0.8 * (deviceDisplay.MainDisplayInfo.Height / deviceDisplay.MainDisplayInfo.Density)); + Medium = new(0.4 * (deviceDisplay.MainDisplayInfo.Width / deviceDisplay.MainDisplayInfo.Density), 0.6 * (deviceDisplay.MainDisplayInfo.Height / deviceDisplay.MainDisplayInfo.Density)); + Large = new(0.5 * (deviceDisplay.MainDisplayInfo.Width / deviceDisplay.MainDisplayInfo.Density), 0.8 * (deviceDisplay.MainDisplayInfo.Height / deviceDisplay.MainDisplayInfo.Density)); } // examples for fixed sizes diff --git a/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopUpHandler.windows.cs b/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopUpHandler.windows.cs index 132bab03f1..0ea2845638 100644 --- a/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopUpHandler.windows.cs +++ b/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopUpHandler.windows.cs @@ -41,9 +41,8 @@ public static void MapOnOpened(PopupHandler handler, IPopup view, object? result ArgumentNullException.ThrowIfNull(handler.MauiContext); var parent = view.Parent.ToPlatform(handler.MauiContext); - parent.IsHitTestVisible = false; - handler.PlatformView.XamlRoot = parent.XamlRoot; + handler.PlatformView.XamlRoot = view.GetWindow().Content?.Handler?.MauiContext?.GetPlatformWindow().Content.XamlRoot ?? throw new InvalidOperationException("Window Content cannot be null"); handler.PlatformView.IsHitTestVisible = true; handler.PlatformView.IsOpen = true;