Application User Model ID (AppID) Window Property Sample
Demonstrates how to control the taskbar grouping behavior of an application's windows through the System.AppUserModel.ID property.
This topic contains the following sections.
- Downloading the Sample
- Building the Sample
- Running the Sample
- Related topics
|Product||Minimum Product Version|
|Windows Software Development Kit (SDK)||7.0|
This sample is available in the following locations.
|Code Gallery||Windows Shell Integration Samples on Code Gallery|
|Windows 7 SDK||Download Windows 7 SDK|
In the case of the Windows SDK, once you have downloaded and installed it, you will find the samples in the installed directory. For example, use of the default installation path for the Windows 7 SDK results in the samples being placed under
C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\.
To build the sample from the command prompt:
- Open the command prompt window and navigate to the AppUserModelIDWindowProperty project directory.
To build the sample using Microsoft Visual Studio (preferred):
- Open Windows Explorer and navigate to the AppUserModelIDWindowProperty project directory.
- Double-click the icon for the AppUserModelIDWindowProperty.sln file to open the project in Visual Studio.
- From the Build menu, select Build Solution.
- Navigate to the directory that contains the new executable, using the command prompt or Windows Explorer.
- At the command line, enter
AppUserModelIDWindowProperty.exe. Alternatively, from Windows Explorer double-click the icon for AppUserModelIDWindowProperty.exe.
- To demonstrate the effect Application User Model IDs (AppUserModelIDs) have on taskbar grouping, launch at least three instances of the application at the same time.
- Use the menu to set a different AppUserModelID on each of the three windows. Notice that each separate AppUserModelID results in a separate taskbar button and that windows can change their identity at runtime.
- Set at least two windows to the second AppUserModelID. Notice that they both move into the same taskbar group.
- Open the Taskbar and Start Menu Properties window by right-clicking the taskbar and selecting Properties in the context menu. Change the Taskbar buttons: drop-down between the Combine when taskbar is full and Never combine values. Notice that each window can get a separate button, but that the buttons are grouped by AppUserModelID.