public static IModelIconExtractor <T> ForSymbol(char symbol) { string symbolCode = String.Format("{0:x2}", (UInt32)symbol).ToUpper(); string resourcePath = String.Format("/Themes/Resources/SegoeUISymbols/{0}.png", symbolCode); var retVal = ModelIconExtractor <T> .FromFuncCachable("SegoeUI-" + symbol, () => { byte[] resource = ResourceUtils.GetResourceAsByteArray(dummy, resourcePath); if (resource.Length != 0) { return(resource); } else { return(BitmapUtils.DrawTextToBitmapStream("Segoe UI Symbol", 24, symbol + "").ToByteArray()); } }); return(retVal); }