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

66 lines
3.2 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="ic_home" TargetType="{x:Type views:HomePage}" />
<models:FlyoutPageItem Title="My Folders" Icon="ic_folder" TargetType="{x:Type views:MyFoldersPage}" />
<models:FlyoutPageItem Title="Settings" Icon="ic_settings" TargetType="{x:Type views:SettingsPage}" />
<models:FlyoutPageItem Title="About" Icon="ic_helpcircle" TargetType="{x:Type views:AboutPage}" />
<models:FlyoutPageItem Title="Logout" Icon="ic_logout" TargetType="{x:Type views:LogoutPage}" />
</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}" VerticalOptions="Center" />
<Label Grid.Column="1" Text="{Binding Title}" VerticalTextAlignment="Center" />
</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>