Bug 52705 - cant set Custom Color in Xamarin for Visual studio
Summary: cant set Custom Color in Xamarin for Visual studio
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Dmitry Petrishin
Depends on:
Reported: 2017-02-23 12:58 UTC by Michel
Modified: 2017-11-13 21:08 UTC (History)
13 users (show)

Tags: Cycle9R, ac, vs, Akvelon, Proppy
Is this bug a regression?: Yes
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Michel 2017-02-23 12:58:59 UTC
# Steps to reproduce
In visual studio 2015, on the sotryboard designer, put 2 labels

In the color section, click on custom, try to enter manually three values for each color :  90 92 and 97 in the rgb box. Color revert automatically to 255 0 0 

# Expected behavior

# Actual behavior

# Supplemental info (logs, images, videos)

# Test environment (full version information)
Comment 1 Michel 2017-02-23 13:02:20 UTC
WHen i select any label that have custom color, the reported color on the property page is 255 0 0.

Cant use designer to set colors.
Comment 3 Michel 2017-02-23 13:05:44 UTC
But i have the bug on visual studio, not on xamarin studio like others.
Comment 4 Michel 2017-02-23 13:12:17 UTC
This is info i found in storyboard.

<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="3893" translatesAutoresizingMaskIntoConstraints="NO" fixedFrame="YES" text="eEst">
<rect key="frame" x="180" y="808" width="700" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="highlightedColor" colorSpace="calibratedRGB" red="0" green="0" blue="0" alpha="1"/>
<color key="textColor" colorSpace="calibratedRGB" red="1" green="0" blue="0.38039215686274508" alpha="1"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>                </label>
Comment 5 Jon Goldberger [MSFT] 2017-02-28 23:23:37 UTC
Non-engineering team preliminary quick review

## Suspected to be a regression or a problem with a new feature?
Yes. I confirmed the behavior in Cycle 9 [1]. Issue did not occur in Cycle 8 [2]. 

## Specific to one particular project, development computer, or target mobile device?
No. I could reproduce in a new from template iOS project. 

## Includes clear steps to reproduce the problem?

## Already took up time for many users?
Not yet. The forum thread linked in comment 2 seems to be a different issue. Different IDE plus the described behavior is different from what I observed here. Also there is only one user on the cc list at this time. 

## Makes development (a) difficult, impossible, or potentially hazardous, (b) moderately inconvenient, or (c) mildly inconvenient for users?
b) Moderately inconvenient. The color is set on the label, just the display in the Properties->Widget pane is incorrect. Immediately after setting a custom color, the RGB fields revert to showing 255, 0, 0, though the color of the text in the label is correct and reflects the custom color that was set whether using the color picker or entering the RGB values, and the correct color value is saved to the storyboard. 

## Environment 
[1] As Below with Xamarin on Windows
On Mac, as below with:

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Xamarin (00fa5cc)

On Mac:
=== Xamarin Studio Enterprise ===

Version 6.1.5 (build 0)
Installation UUID: ceaba76c-db06-4fbd-b326-f69ea53c3e01
	Mono 4.6.2 (mono-4.6.0-branch/ac9e222) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406020016

=== NuGet ===


=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: 7beaef4
Branch: cycle8-xi
Build date: 2016-12-20 02:58:14-0500

=== Build Information ===

Release ID: 601050000
Git revision: 7494718e127af9eaec45a3bd6282d3da927488bd
Build date: 2017-01-17 10:31:01-05
Xamarin addins: c92d0626d347aaa02839689eaac2961d24c9f446
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.12.3
Darwin Jons-MacBook-Pro.local 16.4.0 Darwin Kernel Version 16.4.0
    Thu Dec 22 22:53:21 PST 2016
    root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Addin Maker 1.3.2
Xamarin Inspector
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2017-02-28 23:38:16 UTC
## Partial workaround, just to highlight it based on the information in Comment 5

In theory, a partial workaround is to ignore the incorrect field values in the "Properties > Widget" pane when they get reset.  Since the value is _saved_ correctly, this should allow development to proceed mostly as normal as a temporary workaround.  Unfortunately, this will require always re-entering all 3 color values.
Comment 7 Michel 2017-03-26 11:00:44 UTC
There is a lot of "communication" problems  like this on between the storyboard designer and the Properties Pane.  It's not only the colors.

- Sometimes, when i Change a Label text on the property pane,  It dont reflect on the StoryBoard designer. I have to close it (ctrl-F4 on visual studio) and reopen the storyboard to see the new label text.

- On the property pane - Layout tabe, when you change the width and height properties, sometimes it work, sometimes it revert back to old width or heigth.

Those "communication" problemes are all over the place.

Thank you.
Comment 8 Kent Green [MSFT] 2017-07-13 19:12:00 UTC
I reviewed this issue to see if it is also occurring in Visual Studio for Mac; it seems that selecting a custom color there does not use a direct RGB entry, but instead uses a GUI for selecting custom colors via various methods (including RGB, Hex etc.). Therefore my conclusion is that this issue is not reproducible in Visual Studio for Mac because the tool is not implemented in the same way.
Comment 9 Alex Corrado [MSFT] 2017-11-13 21:08:25 UTC
Fixed in designer/master by a8afded635ea5c7c91302c95aa739652339a2c04