我需要制作如下图所示的东西。是否可以在主详细信息的详细信息页面中添加选项卡式页面?每当我尝试时,我都会不断收到无效的 cast t 错误。请帮忙
用 webview 尝试了这段代码,但得到了无效的强制转换异常
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Company.MobileApp.Custom"
x:Class="Company.MobileApp.AboutPage">
<Frame Padding="5"
BackgroundColor="White"
HasShadow="True"
VerticalOptions="Center"
HorizontalOptions="Center"
OutlineColor="Black"
HeightRequest="80"
WidthRequest="1000"
MinimumHeightRequest="40"
MinimumWidthRequest="200">
<StackLayout Padding="20,5,20,0">
<Label Text="Energy Comsumption" Style="{StaticResource boldLabelCenter}" />
<local:CustomPicker x:Name="ddlPremises" HeightRequest="40" />
</StackLayout>
</Frame>
<!--Pages can be added as references or inline-->
<ContentPage Title="Who is Company?">
<StackLayout>
<WebView Source="https://Company.com.sg/who/"
HeightRequest="1000"
WidthRequest="1000" />
</StackLayout>
</ContentPage>
<ContentPage Title="How to Switch">
<StackLayout>
<WebView Source="https://Company.com.sg/how-to-Company/"
HeightRequest="1000"
WidthRequest="1000" />
</StackLayout>
</ContentPage>
</TabbedPage>