예제 #1
0
		public static void Initialize(PopoverContainerModel properties)
		{
			if(!IsInitialized) {
				_Popover = new PopoverController();
				_Popover.ShouldDismiss = (controller) => { return true; };
				_Popover.Properties = properties;
			}
		}
		public PopoverContainerView(SizeF size, RectangleF anchor, RectangleF displayArea, UIPopoverArrowDirection arrowDirection, PopoverContainerModel properties)
			: base()
		{
			Properties = properties;
			
			_CorrectedSize = new SizeF(size.Width + properties.LeftBgMargin + properties.RightBgMargin + properties.LeftContentMargin + properties.RightContentMargin,
				size.Height + properties.TopBgMargin + properties.BottomBgMargin + properties.TopContentMargin + properties.BottomContentMargin);
			
			DetermineGeometry(size, anchor, displayArea, arrowDirection);
			InitializeFrame();
			this.BackgroundColor = UIColor.Clear;
			
			var image = UIImage.FromBundle(properties.BackgroundImage);
			this._BackgroundImage = image.StretchableImage(properties.LeftBgCapSize, properties.TopBgCapSize);
			
			this.ClipsToBounds = true;
			this.UserInteractionEnabled = true;
		}