Ejemplo n.º 1
0
        public override void SetView(View view)
        {
            base.SetView(view);

            _content = VirtualView?.View?.ToView();
            if (_content != null)
            {
                if (VirtualView?.View != null)
                {
                    VirtualView.View.NeedsLayout += HandleViewNeedsLayout;
                }

                _content.SizeToFit();
                TypedNativeView.Add(_content);

                var measuredSize = VirtualView.View.Measure(new SizeF(float.PositiveInfinity, float.PositiveInfinity));
                TypedNativeView.ContentSize = measuredSize.ToCGSize();
            }

            if (VirtualView.Orientation == Orientation.Horizontal)
            {
                TypedNativeView.ShowsVerticalScrollIndicator   = false;
                TypedNativeView.ShowsHorizontalScrollIndicator = true;
            }
            else
            {
                TypedNativeView.ShowsVerticalScrollIndicator   = true;
                TypedNativeView.ShowsHorizontalScrollIndicator = false;
            }
        }