summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1914.cs
blob: 2759e52ca5e4be20035bf0dfbc9a493e6135bb22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls
{
	[Preserve (AllMembers=true)]
	[Issue (IssueTracker.Github, 1914, "Android rotation ignores anchor", PlatformAffected.Android)]
	public class Issue1914 : ContentPage
	{
		public Issue1914 ()
		{
			Content = new Rotator ();
		}

		class Rotator : AbsoluteLayout
		{
			public Rotator ()
			{
				var image = new Image {Aspect = Aspect.AspectFit, Source = "bank.png"};
				Children.Add (image, new Rectangle (.5,0,100,100), AbsoluteLayoutFlags.All);
				VerticalOptions = HorizontalOptions = LayoutOptions.Center;
				image.RotateTo (3600, 10000);
			}
		}
	}
}