PropertyManager 类

定义

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

注解

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.

构造函数

PropertyManager()

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

字段

onCurrentChangedHandler

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

(继承自 BindingManagerBase)
onPositionChangedHandler

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

(继承自 BindingManagerBase)

属性

Bindings

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

(继承自 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.

(继承自 BindingManagerBase)
Position

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

方法

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.

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetItemProperties()

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

GetItemProperties(ArrayList, ArrayList)

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

(继承自 BindingManagerBase)
GetItemProperties(Type, Int32, ArrayList, ArrayList)

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

(继承自 BindingManagerBase)
GetListName(ArrayList)

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

GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
OnBindingComplete(BindingCompleteEventArgs)

引发 BindingComplete 事件。Raises the BindingComplete event.

(继承自 BindingManagerBase)
OnCurrentChanged(EventArgs)

引发 CurrentChanged 事件。Raises the CurrentChanged event.

OnCurrentItemChanged(EventArgs)

引发 CurrentItemChanged 事件。Raises the CurrentItemChanged event.

OnDataError(Exception)

引发 DataError 事件。Raises the DataError event.

(继承自 BindingManagerBase)
PullData()

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

(继承自 BindingManagerBase)
PushData()

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

(继承自 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()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
UpdateIsBinding()

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

事件

BindingComplete

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

(继承自 BindingManagerBase)
CurrentChanged

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

(继承自 BindingManagerBase)
CurrentItemChanged

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

(继承自 BindingManagerBase)
DataError

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

(继承自 BindingManagerBase)
PositionChanged

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

(继承自 BindingManagerBase)

适用于