protected bool AttachExpressionBindingHandler <AttrT>(Style style, PDFStyleKey <AttrT> key, string value, StyleValueConvertor <AttrT> convert) { StyleValueExpression <AttrT> expression = new StyleValueExpression <AttrT>(key, value, convert); style.DataBinding += expression.BindValue; if (style.IsValueDefined(key)) { style.RemoveValue(key); } style.AddValue(expression); return(true); }