Better Control Overview

3 posts, 0 answers
  1. Torben
    Torben avatar
    9 posts
    Member since:
    Sep 2012

    Posted 07 Dec 2012 Link to this post

    Hello,
    it would be great to have a Control Overview where you can get a List of all Controls which match a sepcific parameter.
    For example i am currently searching for a List of Controls which have the "HtmlEncode" field.
    (If somwhere exists such a list i would be thankfull if someone could post a link to that.)
    So if someone needs an overview of Controls which match a criterion, that nobody else would think of he or she could just use that Site.
  2. Jeff Fritz
    Jeff Fritz avatar
    2 posts
    Member since:
    Mar 2012

    Posted 11 Dec 2012 Link to this post

    If you already have a copy of the controls available, you can easily search across the collection of controls for properties or methods using reflection.

    In a project that already references the controls libraries, you could use a method similar to the following:

    public void InspectControlsForProperty(string propertyName = "HtmlEncode")
    {
     
        var assembly = Assembly.GetAssembly(typeof(Telerik.Web.UI.RadGrid));
     
        var results = assembly.GetTypes().Where(t => t.GetProperty(propertyName) != null);
     
        foreach (var item in results)
        {
            Console.Out.WriteLine("Found {0} in: {1}", propertyName, item.FullName);
        }
     
    }

    Does this help?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Torben
    Torben avatar
    9 posts
    Member since:
    Sep 2012

    Posted 12 Dec 2012 Link to this post

    Yes, that does help.
    Thank you very much :)
Back to Top