I am trying to get all of the available themes for a site collection. When I call GetManagedThemes() I get 0 results. I have tried several site collections and they all return 0 themes.

internal static List<ThmxTheme> GetAvailableThemes(string siteUrl)
        List<ThmxTheme> themes = new List<ThmxTheme>();
        using (SPSite projectSite = new SPSite(siteUrl))
            using (SPWeb web = projectSite.OpenWeb())
                ReadOnlyCollection<ThmxTheme> thmxThemes = ThmxTheme.GetManagedThemes(projectSite);
                foreach (ThmxTheme theme in thmxThemes)
        return themes;

The code above is shown in many examples on the net.

The site collections have the OOB themes available. (I can change the theme using the "Change the Look" option in settings.)

  • 1
    I confirmed the behavior : The collection of Themes is always empty. Note: Was tested on a pre SP1 VM (not sure if was corrected in SP1).
    – user30276
    Jul 4, 2014 at 21:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.