次の方法で共有


PropertyGridObject.Page プロパティ

定義

コンストラクターに渡されるプロパティ グリッド オブジェクトを PropertyGridObject(ModulePropertiesPage) 取得します。

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

プロパティ値

PropertyGridObjectコンストラクターにPropertyGridObject(ModulePropertiesPage)渡される 。

属性

次の例では、トレース リスナーにページ情報を送信します。

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());
}

適用対象