In my NET10 MAUI utility, I’ve a element to show the listing of supported languages. I am utilizing the Popup perform within the CommunityToolkit 13.0.0. The element is working positive for Android and Home windows. It is a screenshot as instance.
After I run the app in iOS, the end result may be very totally different: the popup has margin on the proper and the left though I set explicitly no margin within the web page
<toolkit:Popup
x:Class="LanguageInUse.Parts.LanguageCustomPicker.LanguagePicker"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;meeting=Microsoft.Maui.Controls"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
Margin="{OnPlatform iOS='0', Default="5"}"
Padding="0"
x:TypeArguments="md:LanguageModel">
I binged on-line and I noticed that is fairly a standard drawback however the resolution is said to outdated variations of the toolkit. For instance, one implementation is like this
#if IOS
public class CustomPopupHandler : CommunityToolkit.Maui.Core.Handlers.PopupHandler
{
protected override void ConnectHandler(UIKit.UIView platformView)
{
base.ConnectHandler(platformView);
platformView.InsetsLayoutMarginsFromSafeArea = false;
platformView.LayoutMargins = UIEdgeInsets.Zero;
}
}
#endif
however the PopupHandler does not exist anymore. The results of the popup in iOS is as within the following screenshot. Fairly totally different for the model for Android.
I noticed on GitHub this challenge that it’s fairly outdated. They recommend to make use of a distinct element for the popups known as Mopups. I do not wish to change the best way I create the popup, I spend lots of time to repair the problems coming from the brand new model of the toolkit.
Is there any particular implementation for iOS to take away the margin on the edges? That is the final drawback I’ve to repair earlier than publish the app.



