0

I have two different tabbed pages that I created, and the plan is to put them on one content page or single page, but I'm getting this error:

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

Not sure how I would achieve this.

<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>

JRE
  • 337
  • 3
  • 14
  • "pages" in Forms are intended to be full screen UI elements. You cannot have more than one onscreen at a time – Jason Aug 22 '19 at 11:44
  • thanks for ur quick respond , @Jason , but how would is there anyway where i can achieve something like this on xamarin forms – Penuel Mdluli Aug 22 '19 at 12:00
  • any refference or a page to read on in case can require some custom renders to do this ? Thanks for ur help – Penuel Mdluli Aug 22 '19 at 12:03
  • you can simulate a tabbed interface using a Segmented control – Jason Aug 22 '19 at 12:06
  • Maybe Carousel View will be your need .https://xamarinhelp.com/carousel-view-xamarin-forms/ Otherwise, Shell contains the tab propery can be setted easily. https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/shell/introduction#shell-navigation-experience – Junior Jiang Aug 23 '19 at 02:12

0 Answers0