我正在使用 .NET Community 工具包作为弹出页面。当我们尝试加载弹出页面时,整个 UI 在 iOS 平台上崩溃,但在 Android 平台上工作正常。在弹出页面上我使用的是listView。
截图:
iOS平台:
我使用以下代码打开弹出页面:
this.ShowPopup(new FilterRequestPopupPage("ViewRequestsPage"));
弹出页面示例代码:
<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MyProject.Converter"
Color="Transparent"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="ListPMCaller.Views.Requests.FilterRequestPopupPage">
<Border
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
x:Name="requeststatus_layout"
Margin="15,0"
Stroke="#e6e6e6"
StrokeThickness="2"
StrokeShape="RoundRectangle 20"
Padding="0">
<StackLayout
Orientation="Vertical">
<ListView
VerticalOptions="Start"
x:Name="requestfilter_listview"
SeparatorColor="#cecece"
ItemTapped="requestfilter_listview_ItemTapped"
SelectionMode="None"
CachingStrategy="RecycleElement"
HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout
Padding="5"
Margin="5"
Orientation="Vertical">
<Label
Text="{Binding statusTitle, Converter={StaticResource specialCharactorConverter}}"
TextColor="{Binding TextColor}"
Style="{StaticResource UserNameLabelStyle}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Footer>
<Label/>
</ListView.Footer>
</ListView>
</StackLayout>
</Border>
</toolkit:Popup>
您能为我提供解决此问题的方案吗?该问题仅在 iOS 平台上。
更新
我创建了一个示例项目并将其上传到这里。单击任何选项可查看下一页,然后选择右上角的图标以查看弹出窗口。
预期用户界面: