public Font GetThemeFont(MetroFontSize size, MetroFontWeight weight, string category = "*") { float fontSize; if (!TryGetThemeProperty("FontSize", out fontSize, size.ToString(), category)) { fontSize = MetroDefaults.FontSize; } string fontFamily; if (!TryGetThemeProperty("FontFamily", out fontFamily, weight.ToString(), category)) { fontFamily = MetroDefaults.FontFamily; } FontStyle fontStyle; if (!TryGetThemeProperty("FontStyle", out fontStyle, weight.ToString(), category)) { fontStyle = MetroDefaults.FontStyle; } return(MetroFonts.ResolveFont(fontFamily, fontSize, fontStyle)); }
protected Font GetThemeFont(MetroFontSize size, MetroFontWeight weight) { if (size == MetroFontSize.Default && !TryGetThemeProperty("MetroFontSize", out size)) { size = MetroDefaults.MetroFontSize; } if (weight == MetroFontWeight.Default && !TryGetThemeProperty("MetroFontWeight", out weight)) { weight = MetroDefaults.MetroFontWeight; } return(_styleManager.GetThemeFont(size, weight, MetroControlCategory)); }
public static Font Label(MetroFontSize labelSize, MetroFontWeight labelWeight) { if (labelSize == MetroFontSize.Small) { if (labelWeight == MetroFontWeight.Light) { return(DefaultLight(12f)); } if (labelWeight == MetroFontWeight.Regular) { return(Default(12f)); } if (labelWeight == MetroFontWeight.Bold) { return(DefaultBold(12f)); } } else if (labelSize == MetroFontSize.Medium) { if (labelWeight == MetroFontWeight.Light) { return(DefaultLight(14f)); } if (labelWeight == MetroFontWeight.Regular) { return(Default(14f)); } if (labelWeight == MetroFontWeight.Bold) { return(DefaultBold(14f)); } } else if (labelSize == MetroFontSize.Large) { if (labelWeight == MetroFontWeight.Light) { return(DefaultLight(18f)); } if (labelWeight == MetroFontWeight.Regular) { return(Default(18f)); } if (labelWeight == MetroFontWeight.Bold) { return(DefaultBold(18f)); } } return(DefaultLight(14f)); }
public static Font Label(MetroFontSize labelSize, MetroFontWeight labelWeight) { if (labelSize == MetroFontSize.Small) { if (labelWeight == MetroFontWeight.Light) return DefaultLight(12f); if (labelWeight == MetroFontWeight.Regular) return Default(12f); if (labelWeight == MetroFontWeight.Bold) return DefaultBold(12f); } else if (labelSize == MetroFontSize.Medium) { if (labelWeight == MetroFontWeight.Light) return DefaultLight(14f); if (labelWeight == MetroFontWeight.Regular) return Default(14f); if (labelWeight == MetroFontWeight.Bold) return DefaultBold(14f); } else if (labelSize == MetroFontSize.Large) { if (labelWeight == MetroFontWeight.Light) return DefaultLight(18f); if (labelWeight == MetroFontWeight.Regular) return Default(18f); if (labelWeight == MetroFontWeight.Bold) return DefaultBold(18f); } return DefaultLight(14f); }