March 14th, 2009, 04:05 AM
Color code converter issue vb/wpf
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:
The above code works for large values but for value say 235 in vb it is giving a color similar to red one but in wpf it is giving blue color .
System.Drawing.Color colorLong = System.Drawing.Color.FromArgb(235); Brush color = new SolidColorBrush(Color.FromRgb( colorLong.R, colorLong.G, colorLong.B)); ctrl.Brush = color;
What is going wrong here? What to do in this case?
Thanks in advance,
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!