internal override NativeElement ToNative(NativeElement element)
        {
            var native = EnsureDerived<NativeImage>(element);
            if (native == null)
            {
#if __ANDROID__ || __IOS__
                native = new NativeImage(Rect.ToNative());
#elif WINDOWS_PHONE_APP
                native = new NativeImage();
#endif
            }
            if (Color != BandColor.Empty)
            {
                native.Color = Color.ToNative();
            }
            native.ColorSource = ColorSource.ToNative();
            return base.ToNative(native);
        }
        internal override NativeElement ToNative(NativeElement element)
        {
            var native = EnsureDerived <NativeImage>(element);

            if (native == null)
            {
#if __ANDROID__ || __IOS__
                native = new NativeImage(Rect.ToNative());
#elif WINDOWS_PHONE_APP
                native = new NativeImage();
#endif
            }
            if (Color != BandColor.Empty)
            {
                native.Color = Color.ToNative();
            }
            native.ColorSource = ColorSource.ToNative();
            return(base.ToNative(native));
        }
 internal Icon(NativeImage native)
     : base(native)
 {
     Color = native.Color.FromNative();
     ColorSource = native.ColorSource.FromNative();
 }
 internal Icon(NativeImage native)
     : base(native)
 {
     Color       = native.Color.FromNative();
     ColorSource = native.ColorSource.FromNative();
 }