demo-xf-app-1a/MobileApp1/Views/FlyoutMenuPage.xaml
2021-08-02 22:49:48 +01:00

40 lines
2.0 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="listView" x:FieldModifier="Public">
<ListView.ItemsSource>
<x:Array Type="{x:Type models:FlyoutPageItem}">
<models:FlyoutPageItem Title="Home" Icon="home.png" TargetType="{x:Type views:BlankPage}" />
<models:FlyoutPageItem Title="My Stuff" Icon="layers.png" TargetType="{x:Type views:BlankPage}" />
<models:FlyoutPageItem Title="Settings" Icon="settings.png" TargetType="{x:Type views:BlankPage}" />
<models:FlyoutPageItem Title="About" Icon="help.png" TargetType="{x:Type views:BlankPage}" />
<models:FlyoutPageItem Title="Logout" Icon="logout.png" TargetType="{x:Type views:BlankPage}" />
</x:Array>
</ListView.ItemsSource>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="5, 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Source="{Binding Icon}" />
<Label Grid.Column="1" Text="{Binding Title}" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>