OwnerDrawPropertyBag OwnerDrawPropertyBag OwnerDrawPropertyBag OwnerDrawPropertyBag Class

定义

包含组件可能只是偶尔需要的属性的值。Contains values of properties that a component might need only occasionally.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class OwnerDrawPropertyBag : MarshalByRefObject, System::Runtime::Serialization::ISerializable
[System.Serializable]
public class OwnerDrawPropertyBag : MarshalByRefObject, System.Runtime.Serialization.ISerializable
type OwnerDrawPropertyBag = class
    inherit MarshalByRefObject
    interface ISerializable
Public Class OwnerDrawPropertyBag
Inherits MarshalByRefObject
Implements ISerializable
继承
OwnerDrawPropertyBagOwnerDrawPropertyBagOwnerDrawPropertyBagOwnerDrawPropertyBag
属性
实现

注解

OwnerDrawPropertyBag类使类可以显示为具有它实际上并没有的属性。The OwnerDrawPropertyBag class enables a class to appear to have properties it really does not have. 然后,类可以使用属性需要时,并节省内存,类不使用这些属性时。The class can then use the properties when needed, and save on memory when the class does not use the properties.

OwnerDrawPropertyBag到.NET Framework 中,在内部使用和其构造函数是私有的。The OwnerDrawPropertyBag is used internally to the .NET Framework, and its constructors are private. 不能创建的实例OwnerDrawPropertyBagYou cannot create an instance of the OwnerDrawPropertyBag.

构造函数

OwnerDrawPropertyBag(SerializationInfo, StreamingContext) OwnerDrawPropertyBag(SerializationInfo, StreamingContext) OwnerDrawPropertyBag(SerializationInfo, StreamingContext) OwnerDrawPropertyBag(SerializationInfo, StreamingContext)

初始化 OwnerDrawPropertyBag 类的新实例。Initializes a new instance of the OwnerDrawPropertyBag class.

属性

BackColor BackColor BackColor BackColor

获取或设置组件的背景色。Gets or sets the background color for the component.

Font Font Font Font

获取或设置由组件显示的文本的字体。Gets or sets the font of the text displayed by the component.

ForeColor ForeColor ForeColor ForeColor

获取或设置组件的前景色。Gets or sets the foreground color of the component.

方法

Copy(OwnerDrawPropertyBag) Copy(OwnerDrawPropertyBag) Copy(OwnerDrawPropertyBag) Copy(OwnerDrawPropertyBag)

副本OwnerDrawPropertyBagCopies an OwnerDrawPropertyBag.

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
IsEmpty() IsEmpty() IsEmpty() IsEmpty()

返回是否OwnerDrawPropertyBag包含所有默认值。Returns whether the OwnerDrawPropertyBag contains all default values.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext)

填充指定SerializationInfo序列化目标对象所需的数据。Populates the specified SerializationInfo with the data needed to serialize the target object.

适用于

另请参阅