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:

System.Drawing.Color colorLong = System.Drawing.Color.FromArgb(235); Brush color = new SolidColorBrush(Color.FromRgb( colorLong.R, colorLong.G, colorLong.B)); ctrl.Brush = color;
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 .

What is going wrong here? What to do in this case?

Thanks in advance,