예제 #1
0
 internal void InternalAddBehavior(IBlockBindingBehavior <T> behavior)
 {
     Debug.Assert(behavior != null);
     if (_behaviors == null)
     {
         _behaviors = new List <IBlockBindingBehavior <T> >();
     }
     _behaviors.Add(behavior);
 }
예제 #2
0
 /// <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);
 }