The ColoredRectangleRuntime object can be used to draw a solid (filled) rectangle of any color. To draw a rectangle outline (not filled in), see the RectangleRuntime type.
Code Example
The following code creates a ColoredRectangleRuntime:
var coloredRectangleInstance =newColoredRectangleRuntime();coloredRectangleInstance.Width=120;coloredRectangleInstance.Height=24;coloredRectangleInstance.Color=Color.White; // This is a Microsoft.Xna.Framework.Colorcontainer.Children.Add(coloredRectangleInstance);