Beispiel #1
0
        public Size GetRequiredSize(SizeConstraint widthConstraint)
        {
            var size = Size.Zero;

            Frontend.ApplicationContext.InvokeUserCode(delegate {
                size = Frontend.GetRequiredSize(widthConstraint);
            });
            return(size);
        }
        public override CGSize CellSizeForBounds(CGRect bounds)
        {
            var size = new CGSize();

            Frontend.ApplicationContext.InvokeUserCode(delegate {
                var s = Frontend.GetRequiredSize();
                size  = new CGSize((nfloat)s.Width, (nfloat)s.Height);
            });
            if (size.Width > bounds.Width)
            {
                size.Width = bounds.Width;
            }
            if (size.Height > bounds.Height)
            {
                size.Height = bounds.Height;
            }
            return(size);
        }