private void EhFontFamily_SelectionChangeCommitted(object sender, EventArgs e) { if (FontX != null) { FontX = FontX.WithFamily(_cbFontFamily.SelectedFontFamilyName); OnSelectedFontChanged(); } }
public IEnumerable <(string PropertyName, object PropertyValue, Action <object> PropertySetter)> GetRoutedProperties(string propertyName) { switch (propertyName) { case "FontSize": yield return(propertyName, _font.Size, (value) => Font = _font.WithSize((double)value)); break; case "FontFamily": yield return(propertyName, _font.FontFamilyName, (value) => Font = _font.WithFamily((string)value)); break; } yield break; }
public FontX3D WithFamily(string newFamily) { return(new FontX3D(_font.WithFamily(newFamily), _depth)); }