internal void InternalAddBehavior(IBlockBindingBehavior <T> behavior) { Debug.Assert(behavior != null); if (_behaviors == null) { _behaviors = new List <IBlockBindingBehavior <T> >(); } _behaviors.Add(behavior); }
/// <summary> /// Adds behavior to block binding. /// </summary> /// <typeparam name="T">Element type of row binding.</typeparam> /// <param name="blockBinding">The block binding.</param> /// <param name="behavior">The behavior.</param> /// <returns>The block binding for fluent coding.</returns> public static BlockBinding <T> AddBehavior <T>(this BlockBinding <T> blockBinding, IBlockBindingBehavior <T> behavior) where T : UIElement, new() { if (behavior == null) { throw new ArgumentNullException(nameof(behavior)); } blockBinding.InternalAddBehavior(behavior); return(blockBinding); }