Exemple #1
0
        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);
        }
Exemple #2
0
 public bool IsValidForMode(DataBindingMode currentMode)
 {
     return(_validForModes.HasFlag(currentMode));
 }