If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Color code converter issue vb/wpf

Hi,

There is a vb control which takes a long value of 235 as its backcolor and thus gives out a color similar to red color. However in wpf we do not have any equivalent function that takes long value for color, therefore i have written following code:

Re: Color code converter issue vb/wpf

You are correct, System.Drawing.Color.FromArgb(235) will definitely give you a blue color. Why? You are specifying a 32bit value of the AARRGGBB format. 235 translates to 000000EB in hex. See http://msdn.microsoft.com/en-us/library/2zys7833.aspx. Red would be 00FF0000 in hex (16711680 in decimal).