Created
March 25, 2020 15:25
-
-
Save Char0394/a7109d8c5edb021d13eed1141e07dabb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="PermissionsUISample.Views.PermissionPage" | |
Title="Permissions" | |
BackgroundColor="White" | |
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" | |
ios:Page.UseSafeArea="true"> | |
<StackLayout> | |
<CollectionView ItemsSource="{Binding PermissionsList}" | |
SelectionChangedCommand="{Binding OnSelectPermissionChangeCommand}" | |
SelectedItem="{Binding PermissionSelected, Mode=TwoWay}" | |
SelectionMode="Single"> | |
<CollectionView.ItemTemplate> | |
<DataTemplate> | |
<Grid Padding="10" | |
RowSpacing="5"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="Auto" /> | |
<ColumnDefinition Width="*" /> | |
<ColumnDefinition Width="Auto" /> | |
</Grid.ColumnDefinitions> | |
<Image Grid.RowSpan="2" | |
Source="{Binding Icon}" | |
Aspect="AspectFill" | |
HeightRequest="60" | |
WidthRequest="60" /> | |
<Label Grid.Column="1" | |
Text="{Binding Name}" | |
FontAttributes="Bold" | |
VerticalOptions="End"/> | |
<Label Grid.Row="1" | |
Grid.Column="1" | |
Text="{Binding Description}" | |
VerticalOptions="Start" | |
FontAttributes="Italic"/> | |
<CheckBox Grid.Row="0" | |
Color="#6C8AAE" | |
IsChecked="{Binding IsGranted}" | |
Grid.RowSpan="2" | |
Grid.Column="2"/> | |
</Grid> | |
</DataTemplate> | |
</CollectionView.ItemTemplate> | |
</CollectionView> | |
<Button Text="Next" | |
Command="{Binding GoHomeCommand}" | |
CornerRadius="0" | |
FontSize="20" | |
TextColor="#F9E0A9" | |
BackgroundColor="#6C8AAE" /> | |
</StackLayout> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment