Esempio n. 1
0
        protected internal override void NativeInit()
        {
            if (this.Parent != null && this.Context != null)
            {
                if (this.NativeUIElement == null)
                {
                    var nativeCanvas = new NativeCanvas(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;
                    nativeCanvas.LayoutParameters = layoutParams;
                    this.NativeUIElement = nativeCanvas;
                }
            }
            base.NativeInit();
        }
        protected internal override void NativeInit()
        {
            if (this.Parent != null && this.Context != null)
            {
                if (this.NativeUIElement == null)
                {
                    var nativeCanvas = new NativeCanvas(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;
                    nativeCanvas.LayoutParameters = layoutParams;
                    this.NativeUIElement          = nativeCanvas;
                }
            }
            base.NativeInit();
        }