PropertyManager PropertyManager PropertyManager PropertyManager Class

定义

维护对象的属性与数据绑定控件属性之间的 BindingMaintains a Binding between an object's property and a data-bound control property.

public ref class PropertyManager : System::Windows::Forms::BindingManagerBase
public class PropertyManager : System.Windows.Forms.BindingManagerBase
type PropertyManager = class
    inherit BindingManagerBase
Public Class PropertyManager
Inherits BindingManagerBase
继承

注解

PropertyManager继承BindingManagerBase,并使用它来维护当前属性的对象,而不是在列表中当前对象的属性。The PropertyManager inherits from the BindingManagerBase, and it is used to maintain the current property of an object, rather than the property of a current object in a list. 出于此原因,尝试设置PositionCount属性PropertyManager不起作用。For this reason, trying to set the Position or Count property for a PropertyManager has no effect. 同样,AddNewRemoveAt方法不支持,因为没有要添加到或从中删除的数据的基础列表。Similarly, the AddNew and RemoveAt methods are not supported because there is no underlying list of data to add to or delete from. 此外,调用IsBindingSuspended将始终返回false如果PropertyManager拥有一个数据源,而不管是否SuspendBinding已调用。In addition, a call to IsBindingSuspended will always return false if the PropertyManager has a data source, regardless of whether SuspendBinding has been called.

构造函数

PropertyManager() PropertyManager() PropertyManager() PropertyManager()

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

属性

Bindings Bindings Bindings Bindings

获取所管理绑定的集合。Gets the collection of bindings being managed.

(Inherited from BindingManagerBase)
Count Count Count Count

在派生类中重写时,获取 BindingManagerBase 托管的行数。When overridden in a derived class, gets the number of rows managed by the BindingManagerBase.

Current Current Current Current

获取数据绑定属性所属的对象。Gets the object to which the data-bound property belongs.

IsBindingSuspended IsBindingSuspended IsBindingSuspended IsBindingSuspended

获取一个值,该值指示绑定是否已挂起。Gets a value indicating whether binding is suspended.

(Inherited from BindingManagerBase)
Position Position Position Position

当在派生类中被重写时,获取或设置绑定到该数据源的控件所指向的基础列表中的位置。When overridden in a derived class, gets or sets the position in the underlying list that controls bound to this data source point to.

方法

AddNew() AddNew() AddNew() AddNew()

当在派生类中被重写时,向基础列表添加一个新项。When overridden in a derived class, adds a new item to the underlying list.

CancelCurrentEdit() CancelCurrentEdit() CancelCurrentEdit() CancelCurrentEdit()

当在派生类中被重写时,取消当前编辑。When overridden in a derived class, cancels the current edit.

EndCurrentEdit() EndCurrentEdit() EndCurrentEdit() EndCurrentEdit()

当在派生类中被重写时,结束当前编辑。When overridden in a derived class, ends the current edit.

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)
GetItemProperties() GetItemProperties() GetItemProperties() GetItemProperties()

获取绑定的属性描述的集合。Gets the collection of property descriptions for the binding.

GetItemProperties(ArrayList, ArrayList) GetItemProperties(ArrayList, ArrayList) GetItemProperties(ArrayList, ArrayList) GetItemProperties(ArrayList, ArrayList)

使用指定的 ArrayList 获取绑定的属性说明符集合。Gets the collection of property descriptors for the binding using the specified ArrayList.

(Inherited from BindingManagerBase)
GetItemProperties(Type, Int32, ArrayList, ArrayList) GetItemProperties(Type, Int32, ArrayList, ArrayList) GetItemProperties(Type, Int32, ArrayList, ArrayList) GetItemProperties(Type, Int32, ArrayList, ArrayList)

获取由此 BindingManagerBase 管理的项的属性列表。Gets the list of properties of the items managed by this BindingManagerBase.

(Inherited from BindingManagerBase)
GetListName(ArrayList) GetListName(ArrayList) GetListName(ArrayList) GetListName(ArrayList)

当在派生类中被重写时,获取为绑定提供数据的列表的名称。When overridden in a derived class, gets the name of the list supplying the data for the binding.

GetType() GetType() GetType() GetType()

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

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

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

(Inherited from Object)
OnBindingComplete(BindingCompleteEventArgs) OnBindingComplete(BindingCompleteEventArgs) OnBindingComplete(BindingCompleteEventArgs) OnBindingComplete(BindingCompleteEventArgs)

引发 BindingComplete 事件。Raises the BindingComplete event.

(Inherited from BindingManagerBase)
OnCurrentChanged(EventArgs) OnCurrentChanged(EventArgs) OnCurrentChanged(EventArgs) OnCurrentChanged(EventArgs)

引发 CurrentChanged 事件。Raises the CurrentChanged event.

OnCurrentItemChanged(EventArgs) OnCurrentItemChanged(EventArgs) OnCurrentItemChanged(EventArgs) OnCurrentItemChanged(EventArgs)

引发 CurrentItemChanged 事件。Raises the CurrentItemChanged event.

OnDataError(Exception) OnDataError(Exception) OnDataError(Exception) OnDataError(Exception)

引发 DataError 事件。Raises the DataError event.

(Inherited from BindingManagerBase)
PullData() PullData() PullData() PullData()

将数据从数据绑定控件拉入到数据源,不返回任何信息。Pulls data from the data-bound control into the data source, returning no information.

(Inherited from BindingManagerBase)
PushData() PushData() PushData() PushData()

将数据从数据源推入到数据绑定控件,不返回任何信息。Pushes data from the data source into the data-bound control, returning no information.

(Inherited from BindingManagerBase)
RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

当在派生类中被重写时,从基础列表中删除指定索引处的行。When overridden in a derived class, deletes the row at the specified index from the underlying list.

ResumeBinding() ResumeBinding() ResumeBinding() ResumeBinding()

当在派生类中被重写时,恢复数据绑定。When overridden in a derived class, resumes data binding.

SuspendBinding() SuspendBinding() SuspendBinding() SuspendBinding()

挂起数据源和数据绑定属性之间的数据绑定。Suspends the data binding between a data source and a data-bound property.

ToString() ToString() ToString() ToString()

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

(Inherited from Object)
UpdateIsBinding() UpdateIsBinding() UpdateIsBinding() UpdateIsBinding()

更新数据绑定和数据绑定属性之间当前的 BindingUpdates the current Binding between a data binding and a data-bound property.

事件

BindingComplete BindingComplete BindingComplete BindingComplete

在数据绑定操作完成时发生。Occurs at the completion of a data-binding operation.

(Inherited from BindingManagerBase)
CurrentChanged CurrentChanged CurrentChanged CurrentChanged

在当前绑定项更改时发生。Occurs when the currently bound item changes.

(Inherited from BindingManagerBase)
CurrentItemChanged CurrentItemChanged CurrentItemChanged CurrentItemChanged

在当前绑定项的状态更改时发生。Occurs when the state of the currently bound item changes.

(Inherited from BindingManagerBase)
DataError DataError DataError DataError

ExceptionBindingManagerBase 处理而未给出任何提示时发生。Occurs when an Exception is silently handled by the BindingManagerBase.

(Inherited from BindingManagerBase)
PositionChanged PositionChanged PositionChanged PositionChanged

Position 属性的值更改后发生。Occurs after the value of the Position property has changed.

(Inherited from BindingManagerBase)

字段

onCurrentChangedHandler onCurrentChangedHandler onCurrentChangedHandler onCurrentChangedHandler

CurrentChanged 事件指定事件处理程序。Specifies the event handler for the CurrentChanged event.

(Inherited from BindingManagerBase)
onPositionChangedHandler onPositionChangedHandler onPositionChangedHandler onPositionChangedHandler

PositionChanged 事件指定事件处理程序。Specifies the event handler for the PositionChanged event.

(Inherited from BindingManagerBase)

适用于