To create a Silverlight for Windows Embedded control panel home page for your device, include the SYSGEN_CTLPNL2 catalog item in your OS design. To add standard control panel items to this Silverlight control panel home page, you can add SYSGEN variables or you can directly add registry entries and relevant source files to your OS design.

Add Standard Control Panel Items to a Control Panel Home Page

By default, your OS design includes the SYSGEN_CTLPNL2 catalog item. Registry entries are in the file %_WINCEROOT%\public\wceshellfe\oak\files\wceshellfe.reg and include the following lines to define the basic control panel home page:

;----------------------------start CONTROL PANEL 2 (Settings) ------------------------
; Main Navigation CPL
@="Settings main window"
"Title"="Settings main window"

To add the default applications for setting time and date, display options, and audio options, you can add the SYSGEN variables for SYSGEN_DATETIMECPL, SYSGEN_DISPLAYCPL, and SYSGEN_SNDSCHEMECPL. When you build your OS design, the registry entries and relevant source files for the three control panel items are included in your run-time image. The following code is appended to the %_WINCEROOT%\public\wceshellfe\oak\files\wceshellfe.reg file:

; Date Time XML CPL
        @="Date and Time"
; Display XML CPL
; SndScheme XML CPL

The first three lines in the appended code give the GUIDs of the three control panel items that are now included in the control panel home page; they are listed under the control panel home page registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Settings\{01608162-D728-4009-BDA4-3DB8585E577D}\SecureItems.

Similar to the definition of the control panel home page, the appended code further specifies registry keys for each of the three control panel item GUIDs. Each of these control panel item type is set to 0, which indicates that it is a control panel item that an XML file can provision and that Configuration Manager can display in the device UI. For more information, see Configuration Manager in Windows Embedded Compact 7 Documentation. As the preceding code example illustrates, for this type of control panel item you must specify a title (string or string resource), the location of the XML definition file (.xml), the location of the application code file (.cpl), and the location of an icon file (.png) to display in the control panel home page.

To build your OS, in Microsoft Visual Studio, on the Build menu, click Build Solution or Rebuild Solution. To download the run-time image to your device, with the device connected and selected in Visual Studio, on the Target menu, click Attach Device. To execute the basic control panel home page, on the Target menu, click Run Programs, and then select ctlpnl2.exe to run, or run the command at a command prompt. To do this in Visual Studio, on the Target menu, click Target Control, and then type s ctlpnl2. The basic control panel home page appears on your device and displays the icons for the three default control panel home pages that are defined.

See Also