diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 13:02:25 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 16:13:41 -0700 |
commit | 17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch) | |
tree | b5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs | |
download | xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2 xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip |
Initial import
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs')
-rw-r--r-- | Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs b/Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs new file mode 100644 index 00000000..37fe4c5f --- /dev/null +++ b/Xamarin.Forms.ControlGallery.iOS/BrokenNativeControl.cs @@ -0,0 +1,34 @@ +#if __UNIFIED__ +using CoreGraphics; +using UIKit; +#else +using System.Drawing; +using MonoTouch.UIKit; +#endif + +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 (); } + } + +#if __UNIFIED__ + public override CGSize SizeThatFits (CGSize size) + { + return new CGSize(size.Width, 150); + } +#else + public override SizeF SizeThatFits (SizeF size) + { + return new SizeF (size.Width, 150); + } +#endif + } +}
\ No newline at end of file |