PropertyGridObject Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the PropertyGridObject class.
Overloads
PropertyGridObject(ModulePropertiesPage) |
Initializes a new instance of the PropertyGridObject class. |
PropertyGridObject(ModulePropertiesPage, Boolean) |
Initializes a new instance of the PropertyGridObject class that indicates whether properties are read-only. |
PropertyGridObject(ModulePropertiesPage)
Initializes a new instance of the PropertyGridObject class.
protected:
PropertyGridObject(Microsoft::Web::Management::Client::Win32::ModulePropertiesPage ^ page);
protected PropertyGridObject (Microsoft.Web.Management.Client.Win32.ModulePropertiesPage page);
new Microsoft.Web.Management.Client.PropertyGridObject : Microsoft.Web.Management.Client.Win32.ModulePropertiesPage -> Microsoft.Web.Management.Client.PropertyGridObject
Protected Sub New (page As ModulePropertiesPage)
Parameters
- page
- ModulePropertiesPage
The object that is derived from the ModulePropertiesPage class and calls the constructor.
Examples
The following example implements a constructor that is derived from the PropertyGridObject class.
Remarks
This constructor calls the PropertyGridObject(ModulePropertiesPage, Boolean) constructor and passes false
for the readOnly
parameter.
Applies to
PropertyGridObject(ModulePropertiesPage, Boolean)
Initializes a new instance of the PropertyGridObject class that indicates whether properties are read-only.
protected:
PropertyGridObject(Microsoft::Web::Management::Client::Win32::ModulePropertiesPage ^ page, bool readOnly);
protected PropertyGridObject (Microsoft.Web.Management.Client.Win32.ModulePropertiesPage page, bool readOnly);
new Microsoft.Web.Management.Client.PropertyGridObject : Microsoft.Web.Management.Client.Win32.ModulePropertiesPage * bool -> Microsoft.Web.Management.Client.PropertyGridObject
Protected Sub New (page As ModulePropertiesPage, readOnly As Boolean)
Parameters
- page
- ModulePropertiesPage
The object that is derived from the ModulePropertiesPage class and calls the constructor.
- readOnly
- Boolean
true
to indicate that the properties are read-only; false
to indicate that the properties are read/write.
Examples
The following example implements a constructor that is derived from the PropertyGridObject class.
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;
}