I am creating a custom WPF control that let\'s say for simplicity sake has a vertical stack panel with a \"title\" TextBlock, followed by a ContentPresenter. I want the font
A more generic way
Value converter
public class MathConverter : IValueConverter
{
public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
{
return (double)value + double.Parse( parameter.ToString() );
}
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
{
return null;
}
}
Converter Resource
XAML