corp-app/CORP-MAUI/AppShell.xaml

83 lines
3.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="CORP_MAUI.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:pages="clr-namespace:CORP_MAUI.Pages"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
Shell.TabBarBackgroundColor="#0D6EFD"
Shell.TabBarForegroundColor="White"
Shell.TabBarTitleColor="White"
Shell.TabBarUnselectedColor="#FFFFFF99"
FlyoutBackgroundColor="#0D6EFD"
FlyoutWidth="220"
Shell.NavBarIsVisible="False"
x:Name="MainShell"
FlyoutBehavior="Flyout">
<!-- Flyout Header -->
<Shell.FlyoutHeader>
<Grid HeightRequest="100" BackgroundColor="#0A5ED7" Padding="15">
<VerticalStackLayout VerticalOptions="Center" Spacing="8">
<Image
Source="logo.png"
HeightRequest="40"
WidthRequest="40"
HorizontalOptions="Start"/>
<Label
Text="HiRo"
TextColor="White"
FontSize="14"
FontAttributes="Bold"/>
</VerticalStackLayout>
</Grid>
</Shell.FlyoutHeader>
<!-- Стили для Flyout элементов -->
<Shell.ItemTemplate>
<DataTemplate x:DataType="BaseShellItem">
<Grid ColumnDefinitions="50,*" Padding="10" HeightRequest="50">
<Image
Grid.Column="0"
Source="{Binding Icon}"
HeightRequest="24"
WidthRequest="24"
VerticalOptions="Center"
HorizontalOptions="Center">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="White"/>
</Image.Behaviors>
</Image>
<Label
Grid.Column="1"
Text="{Binding Title}"
TextColor="White"
FontSize="15"
VerticalOptions="Center"/>
</Grid>
</DataTemplate>
</Shell.ItemTemplate>
<!-- FlyoutItems с Shell.TabBarIsVisible для контроля TabBar -->
<FlyoutItem Title="Новости" Icon="feed.png" FlyoutDisplayOptions="AsSingleItem">
<ShellContent ContentTemplate="{DataTemplate pages:PostsPage}" />
</FlyoutItem>
<FlyoutItem Title="Сотрудники" Icon="employees.png" FlyoutDisplayOptions="AsSingleItem">
<ShellContent ContentTemplate="{DataTemplate pages:EmployeesPage}" />
</FlyoutItem>
<FlyoutItem Title="Отделы" Icon="department.png" FlyoutDisplayOptions="AsSingleItem">
<ShellContent ContentTemplate="{DataTemplate pages:DepartmentsPage}" />
</FlyoutItem>
<FlyoutItem Title="Заявления" Icon="statements.png" FlyoutDisplayOptions="AsSingleItem">
<ShellContent ContentTemplate="{DataTemplate pages:RequestsPage}" />
</FlyoutItem>
<FlyoutItem Title="Профиль" Icon="profile.png" FlyoutDisplayOptions="AsSingleItem">
<ShellContent ContentTemplate="{DataTemplate pages:ProfilePage}" />
</FlyoutItem>
</Shell>