MVVM-Samples/samples/MvvmSampleMAUI/App.xaml

183 строки
5.9 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<Application 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"
xmlns:md="clr-namespace:Indiko.Maui.Controls.Markdown;assembly=Indiko.Maui.Controls.Markdown"
x:Class="MvvmSampleMAUI.App">
<Application.Resources>
<Color x:Key="PrimaryColor">#3750D1</Color>
<Color x:Key="FrameBackgroundColorDark">#1AFFFFFF</Color>
<Color x:Key="BackgroundColorDark">#121212</Color>
<Color x:Key="BackgroundColorLight">#EFF2F5</Color>
<Color x:Key="TextPrimaryColorDark">#FFFFFF</Color>
<Color x:Key="TextPrimaryColorLight">#323130</Color>
<OnPlatform x:Key="ShellForegroundColorLight"
x:TypeArguments="Color">
<On Platform="Android"
Value="{StaticResource TextPrimaryColorDark}" />
<On Platform="iOS"
Value="{StaticResource TextPrimaryColorLight}" />
</OnPlatform>
<Style x:Key="BaseStyle"
TargetType="Element"
ApplyToDerivedTypes="True">
<Setter Property="Shell.BackgroundColor"
Value="{AppThemeBinding {StaticResource PrimaryColor}}" />
<Setter Property="Shell.ForegroundColor"
Value="{AppThemeBinding Dark={StaticResource TextPrimaryColorDark}, Light={StaticResource ShellForegroundColorLight}}" />
<Setter Property="Shell.TabBarBackgroundColor"
Value="{AppThemeBinding Dark={StaticResource BackgroundColorDark}, Light={StaticResource BackgroundColorLight}}" />
<Setter Property="Shell.NavBarHasShadow"
Value="false" />
<Setter Property="Shell.UnselectedColor"
Value="Gray" />
<Setter Property="Shell.TabBarTitleColor"
Value="{StaticResource PrimaryColor}" />
</Style>
<Style TargetType="TabBar"
ApplyToDerivedTypes="True"
BasedOn="{StaticResource BaseStyle}" />
<Style TargetType="FlyoutItem"
ApplyToDerivedTypes="True"
BasedOn="{StaticResource BaseStyle}">
</Style>
<Style BasedOn="{StaticResource BaseStyle}"
ApplyToDerivedTypes="True"
TargetType="Tab" />
<Style TargetType="Shell"
ApplyToDerivedTypes="True">
<Setter Property="FlyoutBackgroundColor"
Value="{AppThemeBinding Dark={StaticResource BackgroundColorDark}, Light={StaticResource PrimaryColor}}" />
</Style>
<Style TargetType="Label"
Class="FlyoutItemLabelStyle">
<Setter Property="TextColor"
Value="{StaticResource TextPrimaryColorDark}" />
</Style>
<Style TargetType="Layout"
Class="FlyoutItemLayoutStyle"
ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor"
Value="{AppThemeBinding Dark={StaticResource BackgroundColorDark}, Light={StaticResource PrimaryColor}}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundColor"
Value="{AppThemeBinding Dark={StaticResource FrameBackgroundColorDark}, Light={StaticResource PrimaryColor}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Selected">
<VisualState.Setters>
<Setter Property="BackgroundColor"
Value="{AppThemeBinding Dark={StaticResource PrimaryColor}, Light={StaticResource FrameBackgroundColorDark}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Page"
ApplyToDerivedTypes="True"
BasedOn="{StaticResource BaseStyle}">
<Setter Property="BackgroundColor"
Value="{AppThemeBinding Dark={StaticResource BackgroundColorDark}, Light={StaticResource BackgroundColorLight}}" />
</Style>
<Style TargetType="Label"
ApplyToDerivedTypes="True">
<Setter Property="TextColor"
Value="{AppThemeBinding Dark={StaticResource TextPrimaryColorDark}, Light={StaticResource TextPrimaryColorLight}}" />
</Style>
<Style TargetType="Frame"
ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor"
Value="{AppThemeBinding Dark={StaticResource FrameBackgroundColorDark}, Light={StaticResource BackgroundColorLight}}" />
</Style>
<Style TargetType="Picker">
<Setter Property="TextColor"
Value="{AppThemeBinding Dark={StaticResource TextPrimaryColorDark}, Light={StaticResource TextPrimaryColorLight}}" />
</Style>
<FontImage x:Key="PlayIcon"
FontFamily="FaSolidFont"
Glyph="&#xf04b;"/>
<FontImage x:Key="ExchangeIcon"
FontFamily="FaSolidFont"
Glyph="&#xf362;" />
<FontImage x:Key="CalendarIcon"
FontFamily="FaRegularFont"
Glyph="&#xf073;" />
<FontImage x:Key="BookIcon"
FontFamily="FaSolidFont"
Glyph="&#xf02d;" />
<FontImage x:Key="FlagIcon"
FontFamily="FaSolidFont"
Glyph="&#xf024;" />
<FontImage x:Key="CommentIcon"
FontFamily="FaSolidFont"
Glyph="&#xf4ad;" />
<FontImage x:Key="SendIcon"
FontFamily="FaSolidFont"
Glyph="&#xf1d8;" />
<FontImage x:Key="SortIcon"
FontFamily="FaSolidFont"
Glyph="&#xf338;" />
<FontImage x:Key="UndoIcon"
FontFamily="FaSolidFont"
Glyph="&#xf0e2;" />
<FontImage x:Key="CubeIcon"
FontFamily="FaSolidFont"
Glyph="&#xf1b3;" />
<FontImage x:Key="ToolsIcon"
FontFamily="FaSolidFont"
Glyph="&#xf7d9;" />
<FontImage x:Key="WrenchIcon"
FontFamily="FaSolidFont"
Glyph="&#xf0ad;" />
<FontImage x:Key="GlobeIcon"
FontFamily="FaSolidFont"
Glyph="&#xf57d;" />
<FontImage x:Key="RulerIcon"
FontFamily="FaSolidFont"
Glyph="&#xf5ae;" />
<FontImage x:Key="CheckerIcon"
FontFamily="FaSolidFont"
Glyph="&#xf11e;" />
<FontImage x:Key="RefreshIcon"
FontFamily="FaSolidFont"
Glyph="&#xf021;" />
<toolkit:InvertedBoolConverter x:Key="InvertedBoolConverter" />
</Application.Resources>
</Application>