//----------------------------------------------------------------------- // // Created Sept. 2009 by Nicholas Armstrong. Available online at http://nicholasarmstrong.com // // // Various utilities used throughout the demo. // //----------------------------------------------------------------------- namespace NicholasArmstrong.Samples.ECE150.Loops { using System.Windows.Media; /// /// Various utilities used throughout the demo. /// public static class Utilities { /// /// Makes a brush from a string representation. /// /// The colour of the brush to make. /// A brush of the specified colour. public static Brush BrushFromString(string color) { return (Brush)System.ComponentModel.TypeDescriptor.GetConverter(typeof(Brush)).ConvertFromInvariantString(color); } } }