corp-app/CORP-MAUI/Controls/DesktopHeader.xaml

95 lines
4.3 KiB
XML
Raw Permalink 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" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="CORP_MAUI.Controls.DesktopHeader">
<!-- Верхняя панель для десктопа -->
<Grid BackgroundColor="#0D6EFD" HeightRequest="56" Padding="20,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Логотип слева -->
<HorizontalStackLayout Grid.Column="0" Spacing="10" VerticalOptions="Center">
<Image Source="logo.png" HeightRequest="32" WidthRequest="32"/>
<Label Text="HiRo" TextColor="White" FontSize="20" FontAttributes="Bold" VerticalOptions="Center"/>
</HorizontalStackLayout>
<!-- Поисковая строка по центру -->
<Border Grid.Column="1"
StrokeShape="RoundRectangle 20"
BackgroundColor="#3D85FD"
Stroke="Transparent"
Padding="15,0"
HeightRequest="40"
MaximumWidthRequest="500"
HorizontalOptions="Center"
VerticalOptions="Center">
<Grid ColumnDefinitions="Auto,*">
<Image Grid.Column="0" Source="search" HeightRequest="18" WidthRequest="18" VerticalOptions="Center">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="White"/>
</Image.Behaviors>
</Image>
<Entry Grid.Column="1"
Placeholder="Поиск по названию, автору или..."
PlaceholderColor="#CCDDFF"
TextColor="White"
BackgroundColor="Transparent"
Margin="10,0,0,0"
VerticalOptions="Center"/>
</Grid>
</Border>
<!-- Иконки справа -->
<HorizontalStackLayout Grid.Column="2" Spacing="15" VerticalOptions="Center">
<!-- Уведомления -->
<Grid>
<Border StrokeShape="RoundRectangle 20"
BackgroundColor="Transparent"
HeightRequest="40"
WidthRequest="40"
Stroke="Transparent">
<Image Source="notifications" HeightRequest="24" WidthRequest="24"
HorizontalOptions="Center" VerticalOptions="Center">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="White"/>
</Image.Behaviors>
</Image>
</Border>
<!-- Бейдж с количеством -->
<Border StrokeShape="RoundRectangle 10"
BackgroundColor="#FF4444"
HeightRequest="18"
WidthRequest="18"
HorizontalOptions="End"
VerticalOptions="Start"
Margin="0,-2,-2,0">
<Label Text="1" TextColor="White" FontSize="10"
HorizontalOptions="Center" VerticalOptions="Center"/>
</Border>
</Grid>
<!-- Аватар пользователя -->
<Border x:Name="UserAvatarBorder"
StrokeShape="RoundRectangle 20"
HeightRequest="40"
WidthRequest="40"
BackgroundColor="#E0E0E0"
Stroke="White"
StrokeThickness="2">
<Border.GestureRecognizers>
<TapGestureRecognizer Tapped="OnProfileClicked"/>
</Border.GestureRecognizers>
<Image x:Name="UserAvatar"
Source="default_avatar.png"
Aspect="AspectFill"/>
</Border>
</HorizontalStackLayout>
</Grid>
</ContentView>