public void GetData(Action<DataItem, Exception> callback) { // Use this to create design time data var item = new DataItem(); item.AllFonts.Add(new OneFont(new System.Windows.Media.FontFamily("Arial"))); item.AllFonts.Add(new OneFont(new System.Windows.Media.FontFamily("Century"))); item.AllFonts.Add(new OneFont(new System.Windows.Media.FontFamily("Segoe Keycaps"))); item.AllFonts.Add(new OneFont() { OverrideDisplayWith = "Lorem Ipsum" }); item.LastFontSize = 24.5M; callback(item, null); }
public void GetData(Action<DataItem, Exception> callback) { // Use this to connect to the actual data service var item = new DataItem(); var ofl = from f in System.Windows.Media.Fonts.SystemFontFamilies orderby f.ToString() select f; foreach (var ff in ofl) item.AllFonts.Add(new OneFont(ff)); callback(item, null); }