Interaction with design tools and Windows Phone Store apps
Starting with Windows 8.1 Update, design tools can interact with the Resource Management System on Windows desktop to simulate behaviors specific to Windows Phone Store apps.
A design tool like Blend for Microsoft Visual Studio 2013 can use public APIs that are already documented for Windows 8.1 to interact with the Resource Management System. To emulate Windows Phone behaviors in design mode and use phone-specific qualifiers, the Resource Management System conforms to these conventions:
- When a Windows Phone Store app runs in design mode, the Resource Management System looks for the MrmEnvironmentExtDl.dll extension DLL in the app root. If found, the Resource Management System loads this extension DLL and uses it; if not found, the Resource Management System runs with the typical desktop behavior. You can copy the MrmEnvironmentExtDl.dll extension DLL from the Windows Phone software development kit (SDK). A design tool must place a copy of the MrmEnvironmentExtDl.dll extension DLL into the app root if it wants to emulate Windows Phone behaviors in design mode. This extension DLL is signed with a Microsoft-issued certificate. The Resource Management System requires a certificate-signed DLL to prevent a malicious DLL with the "MrmEnvironmentExtDl.dll" name from being placed into the app root, which causes the Resource Management System to load that malicious DLL.
- When a Windows Phone Store app runs, by default, the Resource Management System looks for and loads a resources.pri file in the app root. When an app runs in design mode, the Resource Management System looks for a different PRI file renamed resources.designmode.pri. If not found, the Resource Management System reverts to the default behavior of looking for and loading a resources.pri file. You can use the MakePRI.exe tool and the Windows Phone Store app environment to generate the renamed PRI file for the app. A design tool can optionally place the renamed PRI file into the app root (for design-time only) if it wants to load the renamed PRI file on startup for access to phone-specific qualifiers. Alternatively, the design tool can use public APIs, like ResourceManager.LoadPriFiles and ResourceManager.UnloadPriFiles, to manually load and unload specific PRI files after it launches.