コード例 #1
0
        internal void UpdateInsets()
        {
            if (this.lastKeyboardRect.IsEmpty || this.fetchWindow() == null)
            {
                return;
            }
            NSView firstResponder = UIViewExtensions.FindFirstResponder(this.targetView);
            CGRect frame          = this.targetView.Frame;
            CGSize size           = frame.Size;
            // ISSUE: reference to a compiler-generated method
            CGRect cgRect = CGRect.Intersect(this.targetView.Superview.ConvertRectFromView(this.lastKeyboardRect, (NSView)null), this.targetView.Frame);

            this.setInsetAction(new UIEdgeInsets((nfloat)0, (nfloat)0, cgRect.Height, (nfloat)0));
            if (!(firstResponder is UITextView) || this.setContentOffset == null)
            {
                return;
            }
            nfloat nfloat = size.Height - cgRect.Height;
            NSView uiView = firstResponder;

            frame = uiView.Frame;
            CGPoint location  = frame.Location;
            NSView  superview = this.targetView.Superview;
            // ISSUE: reference to a compiler-generated method
            nfloat y1 = uiView.ConvertPointToView(location, superview).Y;

            frame = firstResponder.Frame;
            nfloat height = frame.Height;
            nfloat y2     = y1 + height - nfloat;

            if (!(y2 > (nfloat)0))
            {
                return;
            }
            this.setContentOffset(new CGPoint((nfloat)0, y2));
        }
コード例 #2
0
        public SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
        {
            var size = UIViewExtensions.GetSizeRequest(this.NativeView, widthConstraint, heightConstraint, 44.0, 44.0);

            return(size);
        }
コード例 #3
0
 public string ShowLocalVisualTree(int fromHeight) => UIViewExtensions.ShowLocalVisualTree(this, fromHeight);
コード例 #4
0
 public string ShowDescendants() => UIViewExtensions.ShowDescendants(this);
コード例 #5
0
ファイル: FlipViewRender.cs プロジェクト: ibarajas/FlipView
 public override SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
 {
     this.Control.UpdateLayout(widthConstraint, heightConstraint);
     return(UIViewExtensions.GetSizeRequest(this.NativeView, widthConstraint, heightConstraint, 44.0, 44.0));
 }
コード例 #6
0
ファイル: MapViewRenderer.cs プロジェクト: cschwarz/AppShell
 public override SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
 {
     return(UIViewExtensions.GetSizeRequest(Control, widthConstraint, heightConstraint, -1.0, -1.0));
 }