Xaml 将自定义按钮插入底部栏外壳

Xaml 将自定义按钮插入底部栏外壳,xaml,xamarin.forms,Xaml,Xamarin.forms,我曾尝试使用选项卡创建底部栏,但它不接受内容页作为单个按钮的内容。因此,我试图将在选项卡中创建的底部栏转换为Shell页面,允许您插入contentPage作为导航页面。 难点在于创建如下按钮: 我创建了自己的controlTemplate,问题是单个选项卡元素不接受自定义controlTemplate。我该如何解决 <ControlTemplate x:Key="FabTabItemTemplate">

我曾尝试使用
选项卡创建
底部栏
,但它不接受
内容页
作为单个按钮的内容。因此,我试图将在
选项卡
中创建的
底部栏
转换为
Shell
页面,允许您插入
contentPage
作为导航页面。 难点在于创建如下按钮:

我创建了自己的
controlTemplate
,问题是单个选项卡元素不接受自定义
controlTemplate
。我该如何解决

     <ControlTemplate
                x:Key="FabTabItemTemplate">
                <Grid>
                    <yummy:PancakeView HorizontalOptions="Center" CornerRadius="40" Padding="14" Margin="0,0,4,20" >
                        <yummy:PancakeView.BackgroundGradientStops>
                            <yummy:GradientStop Color="Blue" Offset="0"/>
                            <yummy:GradientStop Color="LightBlue" Offset="1"/>
                        </yummy:PancakeView.BackgroundGradientStops>
    
                        <xct:Expander Rotation="180" HorizontalOptions="Start" VerticalOptions="End" Tapped="Expander_Tapped">
                            <xct:Expander.Header>
                                <Image Source="ExpanderPlus.png" WidthRequest="30" HeightRequest="30" Rotation="180">
                                    <Image.Triggers>
                                        <DataTrigger TargetType="Image"
                                             Binding="{Binding Source={RelativeSource AncestorType={x:Type xct:Expander}}, Path=IsExpanded}"
                                             Value="True">
                                            <Setter Property="Source" Value="ExpanderClose.png"/>
                                        </DataTrigger>
                                    </Image.Triggers>
                                </Image>
                            </xct:Expander.Header>
                            <StackLayout Spacing="30" Margin="0,20">
                                <ImageButton Clicked="ExpanderNote_Clicked" Source="ExpanderWriting.png" BackgroundColor="Transparent" Widt

hRequest="30" HeightRequest="30" Rotation="180" />
                            <ImageButton Clicked="ExpanderSmile_Clicked" Source="Smile.png" BackgroundColor="Transparent" WidthRequest="30" HeightRequest="30" Rotation="180"  />
                        </StackLayout>
                    </xct:Expander>
                </yummy:PancakeView>

            </Grid>
        </ControlTemplate>

//Does not work
 <Tab ControlTemplate="{StaticResource FabTabItemTemplate}"/>

//不起作用

您说过您已经创建了一个带有
选项卡的
底部栏
,但它不接受
内容页
作为单个按钮的内容。我建议您可以尝试改用
Contentview
。我不清楚这句话:我创建了自己的controlTemplate,问题是单个Tab元素不接受自定义controlTemplate。