|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<Shell |
| 3 | + x:Class="DateCalculator.Forms.AppShell" |
| 4 | + xmlns="http://xamarin.com/schemas/2014/forms" |
| 5 | + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
| 6 | + xmlns:d="http://xamarin.com/schemas/2014/forms/design" |
| 7 | + xmlns:local="clr-namespace:DateCalculator.Forms" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + xmlns:vw="clr-namespace:DateCalculator.UI.Views;assembly=DateCalculator.UI" |
| 10 | + FlyoutBehavior="Disabled" |
| 11 | + mc:Ignorable="d"> |
| 12 | + <!-- |
| 13 | + The overall app visual hierarchy is defined here, along with navigation. |
| 14 | + Ensure atleast a Flyout item or a TabBar is defined for Shell to work |
| 15 | + --> |
| 16 | + <Shell.Resources /> |
| 17 | + <!-- |
| 18 | + When the Flyout is visible this defines the content to display in the flyout. |
| 19 | + FlyoutDisplayOptions="AsMultipleItems" will create a separate flyout item for each child element |
| 20 | + --> |
| 21 | + <!-- |
| 22 | + Uncomment the below section to enable Shell Flyout item(s) |
| 23 | + And ensure appropriate page definitions are available for it work as expected |
| 24 | + --> |
| 25 | + <FlyoutItem Title="Date Calculation"> |
| 26 | + <ShellContent |
| 27 | + ContentTemplate="{DataTemplate vw:DatePage}" |
| 28 | + Route="date-calc" /> |
| 29 | + </FlyoutItem> |
| 30 | + <!-- |
| 31 | + <FlyoutItem Title="Search"> |
| 32 | + <ShellContent ContentTemplate="{DataTemplate local:SearchPage}" Route="search" /> |
| 33 | + </FlyoutItem> |
| 34 | + --> |
| 35 | + <!-- |
| 36 | + When the Flyout is visible this will be a menu item you can tie a click behavior to |
| 37 | + --> |
| 38 | + <!-- |
| 39 | + Uncomment the below section to enable Menu item(s) |
| 40 | + And ensure appropriate page definitions are available for it work as expected |
| 41 | + --> |
| 42 | + <!-- |
| 43 | + <MenuItem Clicked="OnMenuItemClicked" Text="Logout" /> |
| 44 | + --> |
| 45 | + <!-- |
| 46 | + TabBar lets you define content that won't show up in a Flyout menu. When this content is active |
| 47 | + the flyout menu won't be available. This is useful for creating areas of the application where |
| 48 | + you don't want users to be able to navigate away from. If you would like to navigate to this |
| 49 | + content you can do so by calling |
| 50 | + await Shell.Current.GoToAsync("//login"); |
| 51 | + --> |
| 52 | + <!-- |
| 53 | + Uncomment the below section to enable TabBar item(s) |
| 54 | + And ensure appropriate page definitions are available for it work as expected |
| 55 | + --> |
| 56 | + <!-- |
| 57 | + <TabBar> |
| 58 | + <ShellContent ContentTemplate="{DataTemplate local:LoginPage}" Route="login" /> |
| 59 | + </TabBar> |
| 60 | + --> |
| 61 | + <!-- Optional Templates |
| 62 | + // These may be provided inline as below or as separate classes. |
| 63 | +
|
| 64 | + // This header appears at the top of the Flyout |
| 65 | + <Shell.FlyoutHeaderTemplate> |
| 66 | + <DataTemplate> |
| 67 | + <Grid>ContentHere</Grid> |
| 68 | + </DataTemplate> |
| 69 | + </Shell.FlyoutHeaderTemplate> |
| 70 | +
|
| 71 | + // ItemTemplate is for ShellItems as displayed in a Flyout |
| 72 | + <Shell.ItemTemplate> |
| 73 | + <DataTemplate> |
| 74 | + <ContentView> |
| 75 | + Bindable Properties: Title, Icon |
| 76 | + </ContentView> |
| 77 | + </DataTemplate> |
| 78 | + </Shell.ItemTemplate> |
| 79 | +
|
| 80 | + // MenuItemTemplate is for MenuItems as displayed in a Flyout |
| 81 | + <Shell.MenuItemTemplate> |
| 82 | + <DataTemplate> |
| 83 | + <ContentView> |
| 84 | + Bindable Properties: Text, Icon |
| 85 | + </ContentView> |
| 86 | + </DataTemplate> |
| 87 | + </Shell.MenuItemTemplate> |
| 88 | +
|
| 89 | + // This footer appears at the bottom of the Flyout |
| 90 | + <Shell.FlyoutFooterTemplate> |
| 91 | + <DataTemplate> |
| 92 | + <Grid>ContentHere</Grid> |
| 93 | + </DataTemplate> |
| 94 | + </Shell.FlyoutFooterTemplate> |
| 95 | + --> |
| 96 | +</Shell> |
0 commit comments