summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs
blob: f8163c196ac07abc0463452268822a50493807fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using CoreGraphics;
using UIKit;

namespace Xamarin.Forms.ControlGallery.iOS
{
	/// <summary>
	///     This is a custom Android control which deliberately does some incorrect measuring/layout
	/// </summary>
	public class BrokenNativeControl : UILabel
	{
		public override string Text
		{
			get { return base.Text; }
			set { base.Text = value.ToUpper(); }
		}

		public override CGSize SizeThatFits(CGSize size)
		{
			return new CGSize(size.Width, 150);
		}
	}
}