如何在xamarin形式的一个内容页面上添加多个选项卡式页面?

时间:2019-08-22 11:37:15

标签: forms xamarin tabbed stacklayout

我创建了两个不同的选项卡式页面,计划将它们放在一个内容页面或单个页面上,但是出现此错误:

Error   XLS0503 A value of type 'HomeIncidentListTabbedPage' cannot be added to a collection or dictionary of type 'IList'.

不确定如何实现此目标。

<ContentPage.Content>
    <ScrollView>
        <StackLayout>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="250"/>
                </Grid.RowDefinitions>

                <StackLayout Orientation="Vertical"  Grid.Row="0">
                    <Views:HomeTaskListTabbedPage/>
                </StackLayout>

                <StackLayout Orientation="Vertical"  Grid.Row="1">
                    <StackLayout HeightRequest="50" BackgroundColor="#004B21">
                        <Label Text="ACCIDENTS/ICIDENTS" TextColor="White" FontSize="Medium" VerticalOptions="StartAndExpand" HorizontalOptions="CenterAndExpand"/>
                    </StackLayout>
                    <StackLayout Orientation="Vertical"  Grid.Row="0">
                        <Views:HomeIncidentListTabbedPage />
                    </StackLayout>
                </StackLayout>
            </Grid>
        </StackLayout>
    </ScrollView>
</ContentPage.Content>

0 个答案:

没有答案