Partager via


Add a Subtab to a Built-In Top-Level Tab

 

Applies To: Windows Server 2012 Essentials, Windows Home Server 2011, Windows Storage Server 2008 R2 Essentials, Windows Small Business Server 2011 Essentials

A subtab is a tab inside a top-level tab on the Windows Server Essentials Dashboard page. You can add a subtab to the following built-in top-level tabs:

  • Home

  • Users

  • Computers and Backup

  • Shared Folders and Hard Drives

  • Add-ins

Complete the following steps to add a subtab to a built-in tab:

  1. Create a new project by completing the steps listed in Set Up the Development Environment. Ensure that you use the appropriate template for the type of subtab that you need.

  2. If you need a subtab that contains a list view, complete the following procedures listed in How to: Create a Top-Level Tab with a List View:

    • Create a page class

    • Create a business object

    • Create a list provider

    • Create the supporting classes

  3. If you need a subtab that contains a Windows Forms custom control, complete the procedure listed in How to: Create a Top-Level Tab with a Windows Forms Custom Control.

  4. If you need a subtab that contains a WPF custom control, complete the procedure listed in How to: Create a Top-Level Tab with a WPF Custom Control.

  5. Complete the steps in Install the subtab files.

Install the subtab files

An .addin file is required to add a subtab to a built-in top-level tab. The .addin file is an XML file that is used by the Dashboard to identify and load the binary files that are associated with your add-in. The following table lists the attributes that are defined in the .addin file.

Attribute Description
name The identifier for your add-in.
basedir The full path to the folder that contains the binary files.
type Represents the fully qualified type name of the object that defines the add-in and the name of the .dll file (without the .dll extension).

To create the .addin file

  1. In the Visual Studio project that you created, open the AddinConfig.addin file.

    The file contains the following code:

    <addin name="Test Add-in" basedir="PROVIDE_FULL_PATH_TO_BINARIES_HERE" type="MyNamespace.SubTabPage, TopLevelTab" />  
    
  2. Change the name, type, and basedir attributes to values that are specific for your add-in.

  3. Save the .addin file.

  4. Rename the AddinConfig.Addin file to a unique name that does not conflict with other installed add-ins.

For the Dashboard to load the subtab, you must place the .addin file and the associated binary files in the appropriate folders on the server. The steps in the following procedure can be used for subtabs that contain a list view or a custom control.

To install the add-in files

  1. Ensure that the Visual Studio solution for your subtab builds successfully.

  2. Ensure that the .addin file has a unique name from other installed add-ins.

  3. Copy the .addin file to the following folder:

    %ProgramFiles%\Windows Server\Bin\Addins\<TargetTab>

    Note

    <TargetTab> is the name of the folder that matches the name of a built-in top-level tab.

  4. Copy the binary files that are associated with the subtab to the folder that is specified by the basedir attribute in the .addin file.

For more information about the installation requirements for add-ins, see Add-In Installation Requirements.