public List <EditorControl> FindControls <T>() { FindControlByTypeVisitor <T> finder = new FindControlByTypeVisitor <T>(); if (rootCtrl != null) { rootCtrl.Traverse(finder); } return(finder.results); }
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); }