public override DataBindingAttributeDictionary ApplyExtension(DataBindingAttributeDictionary bindings, DataBindingMode currentMode) { if (!_validForModes.HasFlag(currentMode) || !bindings.Any(b => b.Key == _attributeName)) { return(bindings); } var valueBinding = bindings.First(b => b.Key == _attributeName); var extendedValueBinding = BuildExtensionString(valueBinding.Value.ToString()); bindings.SetAttribute(valueBinding.Key, extendedValueBinding); return(bindings); }
public bool IsValidForMode(DataBindingMode currentMode) { return(_validForModes.HasFlag(currentMode)); }