OfficeDev/PnP — pull request #225 by erwinvanhunen (2014-11-04 13:13:28+00:00)
Title: Updated theming code

When writing code to retrieve the current theme I noticed that there is only one construct for doing that: finding the design catalog, and finding the item with a Name of 'Current'. When applying a theme through the UI, the server makes a copy of the selected theme, adds it to the gallery and activates that theme. However, when applying a theme through Web.ApplyTheme this copy is not made as one can only select urls for the color, font and background image files.

I updated the theming code now to make a copy, call it current, and then apply the theme to the web. This way the code behaves the same (-ish) as how the server behaves when it comes to applying a theme.

Added a method to retrieve the current theme (Web.GetCurrentTheme()) and added a few tests to accompany the various theming methods.