Vishnu Babu
Vishnu Babu

Reputation: 1275

How to add a user control inside a tabbed page in xamarin.forms

User control issue

I need a page to be designed as in the picture. Image inside the read ellipse is a user control created using of a ContentView I need a tabbed view where I can actually swipe through the content pages so I used a TabbedPage for this purpose. how can I place the user control which is common to all <TabbedPage.Children> inside the TabbedPage

 <?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:userControls="clr-namespace:TestApp.View.UserControls;assembly=TestApp"
             xmlns:TabControl="clr-namespace:TestApp.View;assembly=TestApp"
             x:Class="TestApp.View.TestView"
             >

   <!--Not working even if I place this on a grid -->
   <!--<userControls:ElectionTimer  EndDate="{Binding ELDate}"/>-->

 <TabbedPage.Children>    
    <TabControl:AllView Title="All"/>
    <TabControl:EducationView Title="Education"/>
    <TabControl:HealthView Title="Health"/>
   </TabbedPage.Children>
</TabbedPage >

Upvotes: 0

Views: 832

Answers (1)

Zroq
Zroq

Reputation: 8382

Currently you can't. You'll have to create a CustomRenderer or use CarouselView.

Upvotes: 1

Related Questions