Share via


How to: Integrate a Hosted Email Solution with a Top-Level Tab

 

Applies To: Windows Server 2012 Essentials

As with other Dashboard add-ins, you can integrate your hosted email solution as a top-level tab on the Dashboard. This integration is identical to creating a normal top-level tab, as described in the Create a Top-Level Tab topic: you create a base tab, use a unique GUID to identify it, and supply the tab name and description. You can choose to supply an icon to display on the page, and you can indicate that you will have custom controls. You can also localize your tab using a .resx file. Once you have created the tab, you can add in additional content, such as sub-tabs and custom controls.

Example

The following code sample describes a top-level Dashboard tab. Note that all of the strings are defined in associated .resx files. This particular sample includes a base tab, an override for the displayed Icon, and the creation of a single sub-tab. For the complete sample project, see the ContosoHostedEmailAddin project in Quickstart: Creating a Hosted Email Adapter.

namespace Contoso.HostedEmail.DashboardAddin  
{  
    [ContainsCustomControl] // Required attribute for custom tabs  
    public class TopLevelTabPageProvider : PageProvider  
    {  
        public TopLevelTabPageProvider()  
            : base(UIConstants.ContosoServicesTopLevelTab,  
                   Resources.ContosoServicesTopLevelTab_DisplayName,  
                   Resources.ContosoServicesTopLevelTab_Description)  
        {  
        }  
  
        protected override Icon CreateImage()  
        {  
            return SystemIcons.Information;  
        }  
  
        protected override object CreatePages()  
        {  
            return (new object[] { new SubTabPage() });  
        }  
    }  
}