PropertyManager Class

Definition

维护对象的属性与数据绑定控件属性之间的 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
Inheritance
PropertyManager

Remarks

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. 因此,尝试为 PropertyManager 设置 PositionCount 属性不起作用。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. 此外,如果 PropertyManager 具有数据源,则对 IsBindingSuspended 的调用将始终返回 false,无论是否调用了 SuspendBindingIn addition, a call to IsBindingSuspended will always return false if the PropertyManager has a data source, regardless of whether SuspendBinding has been called.

Constructors

PropertyManager()

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

Fields

onCurrentChangedHandler

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

(Inherited from BindingManagerBase)
onPositionChangedHandler

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

(Inherited from BindingManagerBase)

Properties

Bindings

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

(Inherited from BindingManagerBase)
Count

获取 BindingManagerBase 托管的行数。Gets the number of rows managed by the BindingManagerBase.

Current

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

IsBindingSuspended

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

(Inherited from BindingManagerBase)
Position

获取绑定到此数据源的控件所指向的基础列表中的位置。Gets the position in the underlying list that controls bound to this data source point to.

Methods

AddNew()

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

CancelCurrentEdit()

取消当前编辑。Cancels the current edit.

EndCurrentEdit()

结束当前编辑。Ends the current edit.

Equals(Object)

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

(Inherited from Object)
GetHashCode()

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

(Inherited from Object)
GetItemProperties()

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

GetItemProperties()

当在派生类中被重写时,获取绑定的属性说明符集合。When overridden in a derived class, gets the collection of property descriptors for the binding.

(Inherited from BindingManagerBase)
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)

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

(Inherited from BindingManagerBase)
GetListName(ArrayList)

获取为绑定提供数据的列表的名称。Gets the name of the list supplying the data for the binding.

GetType()

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

(Inherited from Object)
MemberwiseClone()

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

(Inherited from Object)
OnBindingComplete(BindingCompleteEventArgs)

引发 BindingComplete 事件。Raises the BindingComplete event.

(Inherited from BindingManagerBase)
OnCurrentChanged(EventArgs)

引发 CurrentChanged 事件。Raises the CurrentChanged event.

OnCurrentItemChanged(EventArgs)

引发 CurrentItemChanged 事件。Raises the CurrentItemChanged event.

OnCurrentItemChanged(EventArgs)

引发 CurrentItemChanged 事件。Raises the CurrentItemChanged event.

(Inherited from BindingManagerBase)
OnDataError(Exception)

引发 DataError 事件。Raises the DataError event.

(Inherited from BindingManagerBase)
PullData()

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

(Inherited from BindingManagerBase)
PushData()

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

(Inherited from BindingManagerBase)
RemoveAt(Int32)

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

ResumeBinding()

继续数据绑定。Resumes data binding.

SuspendBinding()

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

ToString()

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

(Inherited from Object)
UpdateIsBinding()

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

Events

BindingComplete

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

(Inherited from BindingManagerBase)
CurrentChanged

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

(Inherited from BindingManagerBase)
CurrentItemChanged

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

(Inherited from BindingManagerBase)
DataError

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

(Inherited from BindingManagerBase)
PositionChanged

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

(Inherited from BindingManagerBase)

Applies to