Share via


PropertyGridObject.Page Property

Definition

Gets the property grid object that is passed to the PropertyGridObject(ModulePropertiesPage) constructor.

protected:
 property Microsoft::Web::Management::Client::Win32::ModulePropertiesPage ^ Page { Microsoft::Web::Management::Client::Win32::ModulePropertiesPage ^ get(); };
[System.ComponentModel.Browsable(false)]
protected Microsoft.Web.Management.Client.Win32.ModulePropertiesPage Page { get; }
member this.Page : Microsoft.Web.Management.Client.Win32.ModulePropertiesPage
Protected ReadOnly Property Page As ModulePropertiesPage

Property Value

The PropertyGridObject that is passed to the PropertyGridObject(ModulePropertiesPage) constructor.

Attributes

Examples

The following example sends page information to the trace listener.

internal class CustomPageMPP : ModulePropertiesPage {
//
protected override void ProcessProperties(
    PropertyBag properties) {

    _bag = properties;
    _clone = _bag.Clone(ReadOnly);
    CustomPropertiesInfo info =
        (CustomPropertiesInfo)TargetObject;

    if (info == null) {
        info = new CustomPropertiesInfo(this, _clone);
        TargetObject = info;
    } else {
        info.Initialize(_clone);
    }

    ClearDirty();
}
internal class CustomPropertiesInfo : PropertyGridObject {

    private PropertyBag _bag;

    public CustomPropertiesInfo(
        ModulePropertiesPage page,
        PropertyBag bag)
        : base(page) {

        Initialize(bag);
    }

    public CustomPropertiesInfo(
        ModulePropertiesPage page,
        PropertyBag bag,
        bool bRO)
        : base(page, bRO) {

        Initialize(bag);
    }

    internal void Initialize(PropertyBag bag) {
        _bag = bag;
        TrcData();
    }

    bool GetBoolProp(SH.PropInt pi) {

        object o = _bag[pi.Indx];
        if (o == null)
            return false;

        return (bool)o;
    }
void trcCP() {

    CustomPageMPP cp = (CustomPageMPP)this.Page;

    Trace.WriteLine("Width \"" + cp.Width.ToString()
        + "\"  Height: " + cp.Size.Height.ToString());
}

Applies to