Example #1
0
    public List <EditorControl> FindControls <T>()
    {
        FindControlByTypeVisitor <T> finder = new FindControlByTypeVisitor <T>();

        if (rootCtrl != null)
        {
            rootCtrl.Traverse(finder);
        }
        return(finder.results);
    }
Example #2
0
    public T FindControl <T>() where T : EditorControl
    {
        FindControlByTypeVisitor <T> finder = new FindControlByTypeVisitor <T>();

        if (rootCtrl != null)
        {
            rootCtrl.Traverse(finder);
        }
        if (finder.results.Count > 0)
        {
            return(finder.results[0] as T);
        }
        return(null);
    }