Skip to content

Instantly share code, notes, and snippets.

@jimoneil
Last active December 27, 2015 06:19
Show Gist options
  • Save jimoneil/7280364 to your computer and use it in GitHub Desktop.
Save jimoneil/7280364 to your computer and use it in GitHub Desktop.
Snippets for APIMASH tutorial
<Page.Resources>
<DataTemplate x:Key="TeamItemTemplate">
<Grid Width="250" Height="250">
<Grid.RowDefinitions>
<RowDefinition Height="161*"/>
<RowDefinition Height="51*"/>
<RowDefinition Height="38*"/>
</Grid.RowDefinitions>
<Rectangle Fill="#FFF4F4F5" Stroke="Black"/>
<TextBlock Grid.Row="1" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Center" TextAlignment="Center" FontSize="16"/>
<TextBlock Grid.Row="2" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Center" TextAlignment="Center" FontSize="16"/>
</Grid>
</DataTemplate>
</Page.Resources>
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<GridView x:Name="TeamGrid" ItemTemplate="{StaticResource TeamItemTemplate}"/>
</Grid>
==================
String colorString = value as String;
return new SolidColorBrush(Color.FromArgb(255,
Byte.Parse(colorString.Substring(0,2), System.Globalization.NumberStyles.HexNumber),
Byte.Parse(colorString.Substring(2, 2), System.Globalization.NumberStyles.HexNumber),
Byte.Parse(colorString.Substring(4, 2), System.Globalization.NumberStyles.HexNumber)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment