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 合併指標
 (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

貢獻者指南