Share via


ModuleListPage Constructors

Definition

Initializes a new instance of the ModuleListPage class.

Overloads

ModuleListPage()

Initializes a new instance of the ModuleListPage class.

ModuleListPage(ListPageListView)

Initializes a new instance of the ModuleListPage class by using the specified list view.

ModuleListPage()

Initializes a new instance of the ModuleListPage class.

protected:
 ModuleListPage();
protected ModuleListPage ();
Protected Sub New ()

Examples

The following example shows a class that is derived from the ModuleListPage class and uses the parameterless ModuleListPage() constructor.

internal class DemoPage : ModuleListPage {

    public DemoPage() : base() { }
    ModuleListPageGrouping _entryTypeGrouping;

Remarks

Most derived classes will use this constructor unless they need specialized list view behavior.

Applies to

ModuleListPage(ListPageListView)

Initializes a new instance of the ModuleListPage class by using the specified list view.

protected:
 ModuleListPage(Microsoft::Web::Management::Client::Win32::ListPageListView ^ listView);
protected ModuleListPage (Microsoft.Web.Management.Client.Win32.ListPageListView listView);
new Microsoft.Web.Management.Client.Win32.ModuleListPage : Microsoft.Web.Management.Client.Win32.ListPageListView -> Microsoft.Web.Management.Client.Win32.ModuleListPage
Protected Sub New (listView As ListPageListView)

Parameters

listView
ListPageListView

The ListPageListView object to be displayed.

Examples

The following example creates a class that is derived from the ListPageListView class and attaches it to the ModuleListPage(ListPageListView) constructor.

class MySettingsPage : ModuleListPage {

    public MySettingsPage()
        : base(new MyListView()) {
    } 
    private sealed class MyListView : ListPageListView {

        protected override void 
            OnDrawColumnHeader(
            DrawListViewColumnHeaderEventArgs e) {

            e.DrawDefault = true;
            base.OnDrawColumnHeader(e);
        }

        protected override void 
            OnDrawItem(DrawListViewItemEventArgs e) {
            e.DrawDefault = true;
            base.OnDrawItem(e);
        }

        protected override void 
            OnDrawSubItem(DrawListViewSubItemEventArgs e) {
            e.DrawDefault = true;
            base.OnDrawSubItem(e);
        }
    }
} 

Remarks

This constructor gives you greater flexibility for handling events and properties on the internal ListPageListView object.

Applies to