Exemplo n.º 1
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();

            // change position of Legal link on map
            var legalView = Subviews.FirstOrDefault(x => x is UILabel);

            if (legalView != null)
            {
                var leftMargin      = 8;
                var bottomMargin    = 13;
                var menuButtonWidth = 39;
                legalView
                .SetX(leftMargin + menuButtonWidth + 15)
                .SetY(Frame.Bottom - legalView.Frame.Height - bottomMargin);
            }
        }
Exemplo n.º 2
0
        void UpdateContent()
        {
            ClipsToBounds = true;

            if (Element.Content == null)
            {
                _contentView = CreateEmptyContent();
                AddSubview(_contentView);
            }
            else
            {
                var content = Subviews.FirstOrDefault(v => v is Platform.DefaultRenderer);

                if (content != null)
                {
                    _contentView = content;
                }
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the first sub-view of this control or null if there is none
 /// </summary>
 public IFrameworkElement GetTemplateRoot()
 {
     return(Subviews.FirstOrDefault() as IFrameworkElement);
 }
Exemplo n.º 4
0
 public UIView GetViewForZooming(UIScrollView sv)
 {
     return(Subviews.FirstOrDefault());
 }