Skip to content

Instantly share code, notes, and snippets.

@conceptdev
Created August 14, 2014 03:02
Show Gist options
  • Save conceptdev/52b485604a3eceb3144c to your computer and use it in GitHub Desktop.
Save conceptdev/52b485604a3eceb3144c to your computer and use it in GitHub Desktop.
Attempt to repro JIT issue with Xamarin.Forms http://forums.xamarin.com/discussion/comment/70473
using System;
using Xamarin.Forms;
namespace App8
{
public class App
{
public static Page GetMainPage ()
{
return new MyPage();
}
}
}
<?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="App8.MyPage">
<ContentPage.Resources>
<ResourceDictionary>
<LayoutOptions x:Key="horzOptions"
Alignment="Center" />
<LayoutOptions x:Key="vertOptions"
Alignment="Center"
Expands="True" />
<OnPlatform x:Key="rowPadding" x:TypeArguments="Thickness">
<OnPlatform.iOS>15, 0, 5, 0</OnPlatform.iOS>
<OnPlatform.Android>5, 0, 5, 0</OnPlatform.Android>
</OnPlatform>
<OnPlatform x:Key="rowHeight" x:TypeArguments="x:Int32">
<OnPlatform.iOS>44</OnPlatform.iOS>
<OnPlatform.Android>44</OnPlatform.Android>
</OnPlatform>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<StackLayout>
<Button Text="Do this!"
HorizontalOptions="{StaticResource horzOptions}"
VerticalOptions="{StaticResource vertOptions}"
BorderWidth="3"
Rotation="-15"
TextColor="Red"
Font="Large" />
<ListView RowHeight="{StaticResource rowHeight}" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment