Ejemplo n.º 1
0
        internal virtual NativeElement ToNative(NativeElement element)
        {
            var native = EnsureDerived <NativeElement>(element, false);

            if (ElementId > 0)
            {
#if __ANDROID__ || __IOS__
                native.ElementId = (ushort)ElementId;
#elif WINDOWS_PHONE_APP
                native.ElementId = ElementId;
#endif
            }
            if (Rect != PageRect.Empty)
            {
                native.Rect = Rect.ToNative();
            }
            native.HorizontalAlignment = HorizontalAlignment.ToNative();
            if (Margins != Margins.Empty)
            {
                native.Margins = Margins.ToNative();
            }
            native.VerticalAlignment = VerticalAlignment.ToNative();
            native.Visible           = Visible;
            return(native);
        }