appshell

<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms" 
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
       xmlns:local="clr-namespace:KACRMV2.Views"
       Title="KACRMV2"
       x:Class="KACRMV2.AppShell">

    <!--
        The overall app visual hierarchy is defined here, along with navigation.
    
        https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/
    -->

    <Shell.Resources>
        <ResourceDictionary>
            <Style x:Key="BaseStyle" TargetType="Element">
                <Setter Property="Shell.BackgroundColor" Value="LightGray" />
                <Setter Property="Shell.ForegroundColor" Value="White" />
                <Setter Property="Shell.TitleColor" Value="White" />
                <Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
                <Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
                <Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource Primary}" />
                <Setter Property="Shell.TabBarForegroundColor" Value="White"/>
                <Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
                <Setter Property="Shell.TabBarTitleColor" Value="White"/>
               
            </Style>
            <Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
            <Style TargetType="FlyoutItem" BasedOn="{StaticResource BaseStyle}" />
            <Style TargetType="Shell"  BasedOn="{StaticResource BaseStyle}" />

            <DataTemplate x:Key="FlyoutItemTemplate">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.25*" />
                        <ColumnDefinition Width="0.75*" />
                    </Grid.ColumnDefinitions>
                    <Image Grid.Column="0"
                       Source="{Binding Icon}"
                       HeightRequest="30"
                       Margin="20,8,0,8" />
                    <Label Grid.Column="1"
                       Text="{Binding Title}"
                       TextColor="Black"
                       VerticalTextAlignment="Center" />
                </Grid>
            </DataTemplate>

            <DataTemplate x:Key="FlyoutHeaderTemplate">
                <StackLayout Orientation="Vertical">
                    <Label HeightRequest="35"
                       Margin="20,0,0,0"
                       Text="{Binding Title}"
                       TextColor="DarkGreen"
                       VerticalTextAlignment="Center" />
                </StackLayout>
            </DataTemplate>
            

        </ResourceDictionary>
    </Shell.Resources>

    <Shell.FlyoutHeader>
        <Grid BackgroundColor="Red"
                  HeightRequest="200">
            <Image Aspect="AspectFill"
                       Source="xamarinstore.jpg"
                       Opacity="0.6" />
            <Label Text="Animals"
                       TextColor="Blue"
                       FontAttributes="Bold"
                       HorizontalTextAlignment="Center"
                       VerticalTextAlignment="Center" />
        </Grid>
    </Shell.FlyoutHeader>


    <TabBar>
        <ShellContent Title="生产叫料"  Icon="icon_about.png" ContentTemplate="{DataTemplate local:AboutPage}" />
        <ShellContent Title="查看叫料" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:ViewCallMat}" />
        <ShellContent Title="呼叫维修" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:TabbedPage1}" />
        <ShellContent Title="设置" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:ItemsPage}" />
    </TabBar>

    <FlyoutItem FlyoutDisplayOptions="AsMultipleItems" >
        <Tab Title="ANALYSIS"
             Icon="chart_icon.png">
            <ShellContent ContentTemplate="{DataTemplate local:ItemsPage}" />
        </Tab>
        <Tab>
            <ShellContent Title="生产叫料"   Icon="icon_about.png" ContentTemplate="{DataTemplate local:AboutPage}" />
        </Tab>  
        <ShellContent Title="查看叫料" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:ViewCallMat}" />
        <ShellContent Title="呼叫维修" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:TabbedPage1}" />
        <ShellContent Title="设置" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:ItemsPage}" />
    </FlyoutItem>

   

    <Shell.FlyoutFooterTemplate>
        <DataTemplate>
            <StackLayout>
                <Label Text="Xaminals"
                       TextColor="GhostWhite"
                       FontAttributes="Bold"
                       HorizontalOptions="Center" />
                <Label Text=""
                       TextColor="GhostWhite"
                       HorizontalOptions="Center" />
            </StackLayout>
        </DataTemplate>
    </Shell.FlyoutFooterTemplate>

    <Shell.FlyoutHeaderTemplate>
        <DataTemplate>
            <Grid BackgroundColor="Black"
                  HeightRequest="200">
                <Image Aspect="AspectFill"
                       Source="xamarinstore.jpg"
                       Opacity="0.6" />
                <Label Text="Animals"
                       TextColor="White"
                       FontAttributes="Bold"
                       HorizontalTextAlignment="Center"
                       VerticalTextAlignment="Center" />
            </Grid>
        </DataTemplate>
    </Shell.FlyoutHeaderTemplate>


    
    <!--
        If you would like to navigate to this content you can do so by calling
        await Shell.Current.GoToAsync("//LoginPage");
    -->
     

</Shell>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Farmwang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值