You can use the IMetroMode interface to check if your library has been loaded inside the Metro style application. Call the GetMonitorMode() method, if pMode will contain MMM_METRO , then you will be sure that you are working in the Metro application.
source share