-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml
62 lines (53 loc) · 2.51 KB
/
App.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:WeatherForecastMauiApp"
xmlns:page="clr-namespace:WeatherForecastMauiApp.Pages"
x:Class="WeatherForecastMauiApp.App">
<Application.Resources>
<ResourceDictionary Source="Resources/Styles/DefaultTheme.xaml"/>
</Application.Resources>
<Application.MainPage>
<Shell
FlyoutWidth="68" FlyoutBackgroundColor="{StaticResource Background_Mid}"
FlyoutBehavior="{OnIdiom Phone=Disabled, Default=Locked}">
<Shell.FlyoutFooterTemplate>
<DataTemplate>
<Grid RowDefinitions="68">
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Grid.GestureRecognizers>
</Grid>
</DataTemplate>
</Shell.FlyoutFooterTemplate>
<!-- Desktop/Tablet-->
<FlyoutItem Title="Home" Style="{StaticResource HomeFlyout}">
<ShellContent ContentTemplate="{DataTemplate page:HomePage}"/>
</FlyoutItem>
<FlyoutItem Title="Favorites" Style="{StaticResource FavFlyout}">
<ShellContent ContentTemplate="{DataTemplate page:FavoritesPage}"/>
</FlyoutItem>
<!-- Phone -->
<TabBar x:Name="PhoneTabs">
<Tab Title="Home" Icon="tab_home.png">
<ShellContent ContentTemplate="{DataTemplate page:HomePage}"/>
</Tab>
<Tab Title="Favorites" Icon="tab_favorites.png">
<ShellContent ContentTemplate="{DataTemplate page:FavoritesPage}"/>
</Tab>
</TabBar>
<Shell.ItemTemplate>
<DataTemplate>
<Grid WidthRequest="44" HeightRequest="68"
ColumnDefinitions="44" RowDefinitions="68">
<Image Source="{Binding FlyoutIcon}"
VerticalOptions="Center"
HorizontalOptions="Center"
HeightRequest="38"
WidthRequest="38"
/>
</Grid>
</DataTemplate>
</Shell.ItemTemplate>
</Shell>
</Application.MainPage>
</Application>