/// <summary> /// Gets bindings by their bound property. /// </summary> /// <param name="This">This BindingCollection.</param> /// <param name="propertyName">Name of the property.</param> /// <returns>A list of bindings that match the given property name.</returns> public static IEnumerable <Binding> GetBindingsByPropertyName(this BindingsCollection This, string propertyName) { Contract.Requires(This != null); return(This.Cast <Binding>().Where(b => b.PropertyName == propertyName)); }