Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Created July 4, 2017 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfversluis/5acc143f355b3ab00fc2bf483f8bee33 to your computer and use it in GitHub Desktop.
Save jfversluis/5acc143f355b3ab00fc2bf483f8bee33 to your computer and use it in GitHub Desktop.
UI page to show our games
<?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:local="clr-namespace:SampleValueConverters" x:Class="SampleValueConverters.SampleValueConvertersPage" xmlns:converters="clr-namespace:SampleValueConverters.ValueConverters;assembly=SampleValueConverters">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="0,20,0,0" />
</OnPlatform>
</ContentPage.Padding>
<ContentPage.Resources>
<ResourceDictionary>
<converters:PlatformToColorConverter x:Key="PlatformToColorConverter"></converters:PlatformToColorConverter>
</ResourceDictionary>
</ContentPage.Resources>
<ListView ItemsSource="{Binding Games}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Name}" TextColor="{Binding GamePlatform, Converter={StaticResource PlatformToColorConverter}}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment