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