Exemple #1
0
        public PlatformViewLayoutBox View(IPlatformView v, IUnit units = null)
        {
            var bounds = new RectangleF(Bounds.X + Padding.Left,
                                        Bounds.Y + Padding.Top,
                                        Bounds.Width - Padding.Left - Padding.Right,
                                        Bounds.Height - Padding.Top - Padding.Bottom);
            var box = new PlatformViewLayoutBox(v, bounds, units ?? Units.PlatformDefault);

            _boxes.Add(box);
            return(box);
        }
Exemple #2
0
 public PlatformViewLayoutBox(IPlatformView view, RectangleF r, IUnit unit) : base(r, unit)
 {
     _view = view ?? throw new ArgumentNullException(nameof(view));
 }
        public static PlatformViewLayoutBox LayoutBox(this IPlatformView view, IUnit unit = null)
        {
            var rect = new RectangleF(0, 0, float.MaxValue, float.MaxValue);

            return(new PlatformViewLayoutBox(view, rect, unit ?? Units.Dp));
        }
Exemple #4
0
 public static LinearLayoutBuilder Add(this LinearLayoutBuilder builder, IPlatformView view, Action <IViewLayoutBox> layout = null)
 {
     return(builder.Add(new LayoutParams(view, layout)));
 }