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. 因此, 尝试为 a Position PropertyManager设置或Count属性不起作用。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 SuspendBinding false 具有数据源,则对的调用将始终返回,而不管是否调用了。PropertyManagerIn 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 托管的行数。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

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

方法

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

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

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

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

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

结束当前编辑。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)

获取为绑定提供数据的列表的名称。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)

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

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

继续数据绑定。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)

适用于