Export (0) Print
Expand All

RegisterPage Method (ModulePageInfo)

IIS 7.0

Registers a new feature with the Home page without categorizing it.

Namespace:  Microsoft.Web.Management.Client
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

void RegisterPage(
	ModulePageInfo itemPageInfo
)

Parameters

itemPageInfo
Type: Microsoft.Web.Management.Client..::..ModulePageInfo
The ModulePageInfo object to be registered.

The feature can be found by type.

protected override void OnGroup(
    ModuleListPageGrouping grouping) {
    ListView.BeginUpdate();
    try {
        if ((grouping == null) ||
            (grouping == EmptyGrouping)) {
            return;
        }

        // Get the dictionary of groups for 
        // this category type
        IDictionary<string, ListViewGroup>
            groups = GroupingsTable[grouping.Name];

        IControlPanel controlPanel =
            (IControlPanel)GetService(typeof(IControlPanel));


        foreach (PageListViewItem item
            in ListView.Items) {
            ControlPanelCategoryInfo categoryInfo =
                controlPanel.GetCategory(
                grouping.Name, item.PageInfo);
            ListViewGroup group = null;
            if (categoryInfo != null) {
                group = groups[categoryInfo.Text];
            }

            // If we couldn't find a group, 
            // assign it to the 'Other' group
            if (group == null) {
                group = groups["Other"];
            }

            item.Group = group;
        }
    } finally {
        ListView.EndUpdate();
    }
}


Community Additions

ADD
Show:
© 2014 Microsoft