SharePoint 2013 Branding with App using Master Page and Theme
With SharePoint 2013, Microsoft has been pushing for the App Model instead of Farm solution. Below is sample code from a provider-hosted app that upload custom master page and theme (.spcolor) files to the SharePoint site, and apply theme through the App installed event. The app is tested as high trust provider hosted app in a On-premise SharePoint 2013 environment. It's in C# with CSOM. Basically, the code does the following: Upload custom master page Set custom master page Upload theme file (.spcolor) Apply Theme This is the App Event receiver class: public class AppEventReceiver : IRemoteEventService { public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties) { SPRemoteEventResult result = new SPRemoteEventResult(); switch (properties.EventType) ...