Пример #1
0
        internal sealed override void Initialize(IElementContainer elementContainer, Constraint findBy)
        {
            if (element != null)
            {
                throw new InvalidOperationException(Resources.Control_HasAlreadyBeenInitialized);
            }

            element = elementContainer.ElementOfType <TElement>(ElementConstraint & findBy);
        }
Пример #2
0
 private static TElement FindElement <TElement>(IElementContainer container, Constraint constraint)
     where TElement : Element
 {
     return(container.ElementOfType <TElement>(constraint));
 }