Make App Icons that Change with a Composed Look


Recently a developer friend was wondering why all the built-in App Icons changed colors on his SharePoint 2013 site when he applied a different color scheme using the “Composed Looks” functionality,but Icons for custom apps he had deployed remained their original color.  The screenshot below shows the Site Contents page both before (Left Side) and after a Theme has been applied using a Composed Look (Right Side).  You can see that all the Icons on the page changed except the last one on the right.  This is the App that I installed using the Visual Studio 2012 SharePoint Hosted App project.  So the question is Why do all the other Icons change?


The first theory was that the App Icons were being recolored using the Theme CSS support that has been available since SharePoint 2010.  But the ability to recolor an image using CSS has always been limited to background images loaded through CSS.  These Icons are loaded using an <IMG> element so there is no way to specify the image in CSS and no way to recolor it.

After using IE’s Developer toolbar to examine the HTML and CSS on the pages above I found that the image itself doesn’t get recolored. But the <a> (anchor tag) that surrounds the Icon is a square rectangle occupying the space behind each image that has its background set to one of the theme colors.  You can see in the screenshot below that the <a> tag has its background set to a class of “ms-storefront-appiconspan’ which is set to an rgb color from a themable css file.  But why does changing the background behind the Icon change the color of the Icon?


The trick is that the Icon file itself is a transparent PNG that is the same size, 90 X 90 pixels, as the anchor tag with the background color behind it.  That way the background color shows through the Icon and appears to recolor the icon itself.  So let’s see what happens to my Visual Studio project if I replace the blue in my App Icon with a Transparent background.  the image below shows the original Icon on the left and the new transparent Icon on the right after I cut the background out using Paint.Net.


After uploading the new Icon image into my visual Studio project and redeploying the custom app you can see that the custom app Icon changes colors along with the Theme in the screenshot below.  If you restrict your Icon to white images and text on a transparent background then your Icon should look like it fits no matter what Composed Look is applied to your site.


Office Developer Tools for Visual Studio 2012 ships full RTM


If you who have been learning to develop the new SharePoint 2013 Apps then you know that the toolset for doing that in Visual Studio 2012 didn’t ship a finished RTM version when SharePoint 2013 shipped its RTM version in November.  Instead we’ve all still been working on a Preview 2 version.  Well no longer! The final version of Office Developer Tools for Visual Studio shipped today.  You can read more about the announcement here: 

And more importantly you can download the new tools via web platform Installer from the following URL:

SharePoint Saturday: Denver – Nov. 11-12

spsDen_logo_smallNext week I’ll be headed for Denver to speak at the Denver SharePoint Saturday event.  I will be presenting two sessions.  One will be an overview for users, admins, and developers who are just getting started on SharePoint online in Office 365.  The other is a more in depth talk for developers and admins on managing the various places that SharePoint stores user information.  I’ve reprinted the abstracts for my talks below:

Intro to Developing for SharePoint Online: What Tools Can I Use? – The introduction of Office 365 drastically changed the SharePoint development landscape. As a managed online service the rules for developing customizations for SharePoint Office 365 are radically different from the ones for an “on-premise” installation. They are also slightly different than developing sandbox solutions. In addition many companies who currently use dedicated SharePoint installations are beginning to consider eventual migration to the Office 365 cloud environment. That means even current “on-premise” development is often constrained in new ways. No matter what kind of development you currently do you need to know how to develop for Office 365. In this workshop/session we’ll cover the following topics:

  • Setting up an Office 365 development environment
  • Developing sandbox solutions for SharePoint Online
  • Building reusable workflows in SharePoint Designer 2010
  • Why the Client Object Model is even more important in Office 365

Users, Profiles, and MySites: Managing a Changing SharePoint User population – Every company has some level of employee change and turnover. The question is how do you manage the graceful removal or modification of user information from SharePoint? If everything is perfectly aligned SharePoint will automatically process and delete the user account, permissions, profile, and MySite for users that are deleted from Active Directory. Updates to user information are also automatic in many cases. But most SharePoint installations don’t have all the necessary components aligned for automated removal of old users and some profile properties refuse to update. In this session we will examine the underlying processes controlling user accounts, permissions, profiles and MySites and how they interact. We’ll look at what works, what doesn’t work, and how to work around it. Along the way we’ll recommend Best Practices for managing users, their profiles, and MySites in a SharePoint environment.