internal sealed override void Initialize(IElementContainer elementContainer, Constraint findBy) { if (element != null) { throw new InvalidOperationException(Resources.Control_HasAlreadyBeenInitialized); } element = elementContainer.ElementOfType <TElement>(ElementConstraint & findBy); }
private static TElement FindElement <TElement>(IElementContainer container, Constraint constraint) where TElement : Element { return(container.ElementOfType <TElement>(constraint)); }