Exemplo n.º 1
0
        internal sealed override ControlCollection <TControl> CreateControlCollection <TControl>(IElementContainer elementContainer)
        {
            var elementCollection = elementContainer.ElementsOfType <TElement>().Filter(ElementConstraint);

            return(ControlCollection <TControl> .CreateControlCollection(elementCollection));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Wraps all elements in the collection as controls of a particular type.
 /// </summary>
 /// <typeparam name="TControl">The <see cref="Control{TElement}" /> subclass</typeparam>
 /// <returns>The collection of controls</returns>
 public virtual ControlCollection <TControl> As <TControl>()
     where TControl : Control, new()
 {
     return(ControlCollection <TControl> .CreateControlCollection(this));
 }