I have defined some styles in a report, now I will set these styles depending of a properties from my buisness object to a shape.
Is this possible? At the moment I use this code, but i would like to use style objects:
Code: Select all
private void SetShapeColor()
{
this.shapeQuestion1.Brush = this.GetBrushOnStatus(Insurant.Phase1Question1);
}
private StiSolidBrush GetBrushOnStatus(int state)
{
if (state == 0)
return new StiSolidBrush(Color.Red);
else if (state == 1)
return new StiSolidBrush(Color.Blue);
else if (state == 2)
return new StiSolidBrush(Color.Green);
return new StiSolidBrush(Color.White);
}
Ralf