xamarin/Xamarin.Forms

[Bug] Inconsistent Xamarin Forms frame background color

开放

#5,950 创建于 2019年4月18日

 (6 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
e/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description While I was designing an application with Xamarin.Forms I realized that the Android version is unable to reproduce a hexadecimal color with accuracy, the color shows it with less intensity with respect to the real color, however, the IOS version reproduces the color perfectly.

The problem is explained in the following repository: "In Xamarin Forms on iOS, the frame control background color does not match the color of other elements due to differences between CGColor and UIColor.

Most iOS renderers work using UIKit and UIColor. The background color for instance is set using UIView.BackgroundColor.

Frame however works using CoreGraphics and CGColor and manipulating a view's layer. The background color is set using UIView.Layer.BackgroundColor."

Steps to Reproduce

  1. Compare the color differences between a Android and IOS.

Expected Behavior That colors appear the same on all devices.

Actual Behavior Currently there are differences in color contrast depending on the device in which it is executed.

Basic Information

  • Version with issue: 3.6.0.344457 and previous versions.
  • Platform Target Frameworks: Android: 8.1, 9

Application example where the problem is reproduced: https://github.com/GalaxiaGuy/xamarin-forms-frame-color

贡献者指南