void Main() { var sp = new System.Windows.Controls.WrapPanel(); sp.Orientation = System.Windows.Controls.Orientation.Horizontal; sp.MaxWidth = 250; var rnd = new Random(); for (int i = 0; i < 100; i++) { var colorCode = 0; colorCode = ("The quick brown fox jumped over the" + (char)rnd.Next(1, 10)).GetHashCode(); var color = this.ConvertIntToColor(colorCode); var element = new System.Windows.Shapes.Ellipse(); element.Width=25; element.Height=25; element.Fill = new SolidColorBrush(color); element.Stroke = new SolidColorBrush(Colors.Black); sp.Children.Add(element); } PanelManager.DisplayWpfElement(sp); } public Color ConvertIntToColor(int colorCode) { var r = (byte)((colorCode >> 16) & 0xFF); var g = (byte)((colorCode >> 8) & 0xFF); var b = (byte)(colorCode & 0xFF); var a = (byte)((colorCode >> 24) & 0xFF); var c = Color.FromArgb(255, r, g, b); return c; }