IControlPanel.Pages Property

Definition

Gets the collection of items registered by a specific module.

public:
 property System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::Web::Management::Client::ModulePageInfo ^> ^ Pages { System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::Web::Management::Client::ModulePageInfo ^> ^ get(); };
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Web.Management.Client.ModulePageInfo> Pages { get; }
member this.Pages : System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Web.Management.Client.ModulePageInfo>
Public ReadOnly Property Pages As ReadOnlyCollection(Of ModulePageInfo)

Property Value

A constructed generic ReadOnlyCollection<T> of ModulePageInfo objects that represent items registered by a specific module.

Examples

The following example searches a module for the page that has the specified assembly name.

private static ModulePageInfo GetModulePageInfo(
    IControlPanel controlPanel, string modulePageTypeName) {
    foreach (ModulePageInfo page in controlPanel.Pages) {
        if (String.Equals(page.PageType.AssemblyQualifiedName,
            modulePageTypeName, StringComparison.OrdinalIgnoreCase)) {
            return page;
        }
    }

    return null;
}

Remarks

Each item is represented by a ModulePageInfo object.

Applies to