2017-02-13 11 views
0

User control issuexamarin.forms

私は絵のように設計されるページが必要にタブ付きページ内のユーザーコントロールを追加する方法。読み取り楕円内の画像は、ContentViewを使用して作成されたユーザーコントロールです。実際にコンテンツページをスワイプできるタブ付きビューが必要なので、この目的でTabbedPageを使用しました。どのように私は現在、あなたがすることはできません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 > 

答えて

1

内のすべての<TabbedPage.Children>に共通するユーザーコントロールを配置することができます。 CustomRendererを作成するか、CarouselViewを使用する必要があります。