Ejemplo n.º 1
0
        protected internal override void NativeInit()
        {
            if (this.Parent != null && this.Context != null)
            {
                if (this.NativeUIElement == null)
                {
                    var nativeGrid = new NativeGrid(this.Context);
                    var layoutParams = new ViewGroup.LayoutParams(0, 0);
                    layoutParams.Width = double.IsNaN(this.NativeWidth) ? ViewGroup.LayoutParams.WrapContent : (int)this.NativeWidth;
                    layoutParams.Height = double.IsNaN(this.NativeHeight) ? ViewGroup.LayoutParams.WrapContent : (int)this.NativeHeight;
                    nativeGrid.LayoutParameters = layoutParams;

                    this.NativeUIElement = nativeGrid;
                }
            }

            base.NativeInit();
        }
Ejemplo n.º 2
0
        protected internal override void NativeInit()
        {
            if (this.Parent != null && this.Context != null)
            {
                if (this.NativeUIElement == null)
                {
                    var nativeGrid   = new NativeGrid(this.Context);
                    var layoutParams = new ViewGroup.LayoutParams(0, 0);
                    layoutParams.Width          = double.IsNaN(this.NativeWidth) ? ViewGroup.LayoutParams.WrapContent : (int)this.NativeWidth;
                    layoutParams.Height         = double.IsNaN(this.NativeHeight) ? ViewGroup.LayoutParams.WrapContent : (int)this.NativeHeight;
                    nativeGrid.LayoutParameters = layoutParams;

                    this.NativeUIElement = nativeGrid;
                }
            }

            base.NativeInit();
        }