demo-xf-app-1a/MobileApp1/Views/FlyoutMenuPage.xaml
2021-08-03 17:43:16 +01:00

66 lines
3.1 KiB
XML

<?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" />
<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>-->
<ListView.ItemsSource>
<x:Array Type="{x:Type models:FlyoutPageItem}">
<models:FlyoutPageItem Title="Home" Icon="home.png" TargetType="{x:Type views:HomePage}" />
<models:FlyoutPageItem Title="My Stuff" Icon="layers.png" TargetType="{x:Type views:BlankPage}" />
<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:BlankPage}" />
</x:Array>
</ListView.ItemsSource>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="5, 10, 5, 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding Icon}" />
<Label Grid.Column="1" Text="{Binding Title}" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<!--<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>-->
</StackLayout>
</ContentPage>