demo-xf-app-1a/MobileApp1/Views/FlyoutMenuPage.xaml

66 lines
3.1 KiB
Plaintext
Raw Normal View History

2021-08-02 21:49:48 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:models="clr-namespace:MobileApp1.Models"
xmlns:views="clr-namespace:MobileApp1.Views"
x:Class="MobileApp1.Views.FlyoutMenuPage"
Padding="0, 20, 0, 0"
Title="Menu">
<StackLayout>
<Image Source="company_logo.png" WidthRequest="{OnPlatform iOS=180, Android=180}" HorizontalOptions="Center" Margin="0, 0, 0, 20" />
2021-08-03 16:43:16 +00:00
<ListView x:Name="listView1">
<!--<ListView.Footer>
<StackLayout VerticalOptions="Start">
<Grid Padding="5, 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Row="0" Grid.Column="0" Source="logout.png" Margin="3" />
<Label Grid.Row="0" Grid.Column="1" Text="Logout" />
</Grid>
</StackLayout>
</ListView.Footer>-->
2021-08-02 21:49:48 +00:00
<ListView.ItemsSource>
<x:Array Type="{x:Type models:FlyoutPageItem}">
2021-08-03 16:43:16 +00:00
<models:FlyoutPageItem Title="Home" Icon="home.png" TargetType="{x:Type views:HomePage}" />
<models:FlyoutPageItem Title="My Stuff" Icon="layers.png" TargetType="{x:Type views:MyStuffPage}" />
2021-08-03 16:43:16 +00:00
<models:FlyoutPageItem Title="Settings" Icon="settings.png" TargetType="{x:Type views:SettingsPage}" />
<models:FlyoutPageItem Title="About" Icon="help.png" TargetType="{x:Type views:AboutPage}" />
<models:FlyoutPageItem Title="Logout" Icon="logout.png" TargetType="{x:Type views:LogoutPage}" />
2021-08-02 21:49:48 +00:00
</x:Array>
</ListView.ItemsSource>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
2021-08-03 16:43:16 +00:00
<Grid Padding="5, 10, 5, 10">
2021-08-02 21:49:48 +00:00
<Grid.ColumnDefinitions>
2021-08-03 16:43:16 +00:00
<ColumnDefinition Width="30" />
2021-08-02 21:49:48 +00:00
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
2021-08-03 16:43:16 +00:00
<Image Grid.Column="0" Source="{Binding Icon}" />
2021-08-02 21:49:48 +00:00
<Label Grid.Column="1" Text="{Binding Title}" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
2021-08-03 16:43:16 +00:00
<!--<ListView x:Name="listView" x:FieldModifier="Public" VerticalOptions="Start">
<StackLayout>
<Grid Padding="5, 10" VerticalOptions="Start">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="logout.png" />
<Label Grid.Column="1" Text="Logout" />
</Grid>
</StackLayout>
</ListView>-->
2021-08-02 21:49:48 +00:00
</StackLayout>
</ContentPage>