Example #1
0
 private void EhFontFamily_SelectionChangeCommitted(object sender, EventArgs e)
 {
     if (FontX != null)
     {
         FontX = FontX.WithFamily(_cbFontFamily.SelectedFontFamilyName);
         OnSelectedFontChanged();
     }
 }
Example #2
0
        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;
        }
Example #3
0
 public FontX3D WithFamily(string newFamily)
 {
     return(new FontX3D(_font.WithFamily(newFamily), _depth));
 }