ModelingBindingSource 类

与 VMSDK(DSL 工具)模型一起使用的专用 BindingSource。 添加或移除项时,创建事务。

继承层次结构

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.BindingSource
        Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource

命名空间:  Microsoft.VisualStudio.Modeling.Design
程序集:  Microsoft.VisualStudio.Modeling.Sdk.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)

语法

声明
Public Class ModelingBindingSource _
    Inherits BindingSource
public class ModelingBindingSource : BindingSource

ModelingBindingSource 类型公开以下成员。

构造函数

  名称 说明
公共方法 ModelingBindingSource() 初始化 Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource 类的一个新实例到默认属性值。
公共方法 ModelingBindingSource(IContainer) 初始化 Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource 类的一个新实例并将新生成的 ModelingBindingSource 对象添加到指定的容器。
公共方法 ModelingBindingSource(Object, String) 使用指定数据源和数据成员来初始化 Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource 类的新实例。

页首

属性

  名称 说明
公共属性 AllowEdit 获取一个值,该值指示是否可以编辑基础列表中的项。 (继承自 BindingSource。)
公共属性 AllowNew 是否 AddNew 允许在此源上调用。 (重写 BindingSource.AllowNew。)
公共属性 AllowRemove 获取一个值,它指示是否可从基础列表中移除项。 (继承自 BindingSource。)
受保护的属性 CanRaiseEvents 获取一个指示组件是否可以引发事件的值。 (继承自 Component。)
公共属性 Container 获取 IContainer,它包含 Component。 (继承自 Component。)
公共属性 Count 获取在的基础列表中项的总数。获取在基础列表中项的总数,考虑当前 Filter 值。 (继承自 BindingSource。)
公共属性 CurrencyManager 获取与此 BindingSource 关联的当前项管理器。 (继承自 BindingSource。)
公共属性 Current 获取列表中的当前项。 (继承自 BindingSource。)
公共属性 DataMember 获取或设置连接器当前绑定到的数据源中的特定列表。 (继承自 BindingSource。)
公共属性 DataSource 获取或设置连接器绑定到的数据源。 (继承自 BindingSource。)
受保护的属性 DesignMode 获取一个值,用以指示 Component 当前是否处于设计模式。 (继承自 Component。)
受保护的属性 Events 获取附加到此 Component 的事件处理程序的列表。 (继承自 Component。)
公共属性 Filter 获取或设置用于筛选查看哪些行的表达式。 (继承自 BindingSource。)
公共属性 IsBindingSuspended 获取一个值,该值指示列表绑定是否已挂起。 (继承自 BindingSource。)
公共属性 IsFixedSize 获取一个值,该值指示基础列表是否具有固定大小。 (继承自 BindingSource。)
公共属性 IsReadOnly 获取一个值,该值指示基础列表是否为只读。 (继承自 BindingSource。)
公共属性 IsSorted 获取一个值,该值指示是否可以对基础列表中的项排序。 (继承自 BindingSource。)
公共属性 IsSynchronized 获取一个值,该值指示对集合的访问是否为同步的(线程安全)。 (继承自 BindingSource。)
公共属性 IsValidDataSource 如果数据源是在 VMSDK 存储中包含的 VMSDK ModelElement,则为 true。
公共属性 Item 获取或设置指定索引处的列表项。如果您设置一个项目,操作将在事件内执行。 (重写 BindingSource.Item。)
公共属性 List 获取连接器绑定到的列表。 (继承自 BindingSource。)
公共属性 Position 获取或设置基础列表中当前项的索引。 (继承自 BindingSource。)
公共属性 RaiseListChangedEvents 获取或设置一个值,该值指示是否应引发 ListChanged 事件。 (继承自 BindingSource。)
公共属性 Site 获取或设置 ComponentISite。 (继承自 Component。)
公共属性 Sort 获取或设置用于排序的列名称以及用于查看数据源中的行的排序顺序。 (继承自 BindingSource。)
公共属性 SortDescriptions 获取应用于数据源的排序说明的集合。 (继承自 BindingSource。)
公共属性 SortDirection 获取列表中项的排序方向。 (继承自 BindingSource。)
公共属性 SortProperty 基础结构。获取正在用于对列表进行排序的 PropertyDescriptor。 (继承自 BindingSource。)
公共属性 SupportsAdvancedSorting 获取一个值,它指示数据源是否支持多列排序。 (继承自 BindingSource。)
公共属性 SupportsChangeNotification 获取一个值,它指示数据源是否支持更改通知。 (继承自 BindingSource。)
公共属性 SupportsFiltering 获取一个值,该值指示数据源是否支持筛选。 (继承自 BindingSource。)
公共属性 SupportsSearching 获取一个值,它指示数据源是否支持使用 Find 方法进行搜索。 (继承自 BindingSource。)
公共属性 SupportsSorting 获取一个值,它指示数据源是否支持排序。 (继承自 BindingSource。)
公共属性 SyncRoot 获取可用于同步对基础列表的访问的对象。 (继承自 BindingSource。)

页首

方法

  名称 说明
公共方法 Add 将一个已存在的项添加到列表中。在事务中执行的操作。 (重写 BindingSource.Add(Object)。)
公共方法 AddNew 在基础列表中添加一个新项。 (重写 BindingSource.AddNew()。)
公共方法 ApplySort(ListSortDescriptionCollection) 使用指定的排序说明对数据源进行排序。 (继承自 BindingSource。)
公共方法 ApplySort(PropertyDescriptor, ListSortDirection) 使用指定的属性说明符和排序方向对数据源进行排序。 (继承自 BindingSource。)
公共方法 CancelEdit 取消当前的编辑操作。 (继承自 BindingSource。)
公共方法 Clear 从列表中移除所有元素。在事务中执行操作。 (重写 BindingSource.Clear()。)
公共方法 Contains 确定某个对象是否为列表中的项。 (继承自 BindingSource。)
公共方法 CopyTo List 中的内容复制到指定数组,从指定索引值处开始。 (继承自 BindingSource。)
公共方法 CreateObjRef 安全关键。创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (继承自 MarshalByRefObject。)
公共方法 Dispose() 释放由 Component 使用的所有资源。 (继承自 Component。)
受保护的方法 Dispose(Boolean) 释放由 BindingSource 占用的非托管资源,还可以另外再释放托管资源。 (继承自 BindingSource。)
公共方法 EndEdit 将挂起的更改应用于基础数据源。 (继承自 BindingSource。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 在通过垃圾回收将 Component 回收之前,释放非托管资源并执行其他清理操作。 (继承自 Component。)
公共方法 Find(String, Object) 使用指定的属性名和值返回列表中的项的索引。 (继承自 BindingSource。)
公共方法 Find(PropertyDescriptor, Object) 搜索具有指定属性描述符的项索引。 (继承自 BindingSource。)
公共方法 GetEnumerator 检索 List 的一个枚举数。 (继承自 BindingSource。)
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetItemProperties 检索表示数据源列表类型的可绑定属性的 PropertyDescriptor 对象的数组。 (继承自 BindingSource。)
公共方法 GetLifetimeService 安全关键。检索控制此实例的生存期策略的当前生存期服务对象。 (继承自 MarshalByRefObject。)
公共方法 GetListName 获取为绑定提供数据的列表的名称。 (继承自 BindingSource。)
公共方法 GetRelatedCurrencyManager 为指定的数据成员获取相关的当前项管理器。 (继承自 BindingSource。)
受保护的方法 GetService 返回一个对象,该对象表示由 Component 或它的 Container 提供的服务。 (继承自 Component。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IndexOf 搜索指定的对象,并返回整个列表中第一个匹配项的索引。 (继承自 BindingSource。)
公共方法 InitializeLifetimeService 安全关键。获取控制此实例的生存期策略的生存期服务对象。 (继承自 MarshalByRefObject。)
公共方法 Insert 将一项插入列表中指定的索引处。在事务中执行操作。 (重写 BindingSource.Insert(Int32, Object)。)
受保护的方法 MemberwiseClone() 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 MemberwiseClone(Boolean) 创建当前 MarshalByRefObject 对象的浅表副本。 (继承自 MarshalByRefObject。)
公共方法 MoveFirst 移至列表中的第一项。 (继承自 BindingSource。)
公共方法 MoveLast 移至列表中的最后一项。 (继承自 BindingSource。)
公共方法 MoveNext 移至列表中的下一项。 (继承自 BindingSource。)
公共方法 MovePrevious 移至列表中的上一项。 (继承自 BindingSource。)
受保护的方法 OnAddingNew 引发 AddingNew 事件。 (继承自 BindingSource。)
受保护的方法 OnBindingComplete 引发 BindingComplete 事件。 (继承自 BindingSource。)
受保护的方法 OnCurrentChanged 引发 CurrentChanged 事件。 (继承自 BindingSource。)
受保护的方法 OnCurrentItemChanged 引发 CurrentItemChanged 事件。 (继承自 BindingSource。)
受保护的方法 OnDataError 引发 DataError 事件。 (继承自 BindingSource。)
受保护的方法 OnDataMemberChanged 引发 DataMemberChanged 事件。 (继承自 BindingSource。)
受保护的方法 OnDataSourceChanged 引发 DataSourceChanged 事件。 (继承自 BindingSource。)
受保护的方法 OnListChanged 当列表发生更改时,为重置存储事件处理程序并重置有效数据源的状态,将调用此方法。 (重写 BindingSource.OnListChanged(ListChangedEventArgs)。)
受保护的方法 OnPositionChanged 引发 PositionChanged 事件。 (继承自 BindingSource。)
受保护的方法 OnPropertyChanged 当属性更改时调用。
公共方法 Remove 从列表中移除指定的项。在事务中执行操作。 (重写 BindingSource.Remove(Object)。)
公共方法 RemoveAt 移除此列表中指定索引处的项。在事务中执行操作。 (重写 BindingSource.RemoveAt(Int32)。)
公共方法 RemoveCurrent 从列表中移除当前项。 (继承自 BindingSource。)
公共方法 RemoveFilter 移除与 BindingSource 关联的筛选器。 (继承自 BindingSource。)
公共方法 RemoveSort 移除与 BindingSource 关联的排序。 (继承自 BindingSource。)
公共方法 ResetAllowNew 基础结构。重新初始化 AllowNew 属性。 (继承自 BindingSource。)
公共方法 ResetBindings 使绑定到 BindingSource 的控件重新读取列表中的所有项,并刷新这些项的显示值。 (继承自 BindingSource。)
公共方法 ResetCurrentItem 使绑定到 BindingSource 的控件重新读取当前选定的项,并刷新其显示值。 (继承自 BindingSource。)
公共方法 ResetItem 使绑定到 BindingSource 的控件重新读取指定索引处的项,并刷新其显示值。 (继承自 BindingSource。)
公共方法 ResumeBinding 继续数据绑定。 (继承自 BindingSource。)
公共方法 SuspendBinding 挂起数据绑定,以阻止使用所做的更改对绑定数据源进行更新。 (继承自 BindingSource。)
公共方法 ToString 返回包含 Component 的名称的 String(如果有)。不应重写此方法。 (继承自 Component。)

页首

事件

  名称 说明
公共事件 AddingNew 在将项添加到基础列表之前发生。 (继承自 BindingSource。)
公共事件 BindingComplete 当所有客户端都已绑定到此 BindingSource 时发生。 (继承自 BindingSource。)
公共事件 CurrentChanged 在当前绑定项更改时发生。 (继承自 BindingSource。)
公共事件 CurrentItemChanged Current 属性的属性值更改后发生。 (继承自 BindingSource。)
公共事件 DataError 当货币相关的异常由 BindingSource 无提示处理时发生。 (继承自 BindingSource。)
公共事件 DataMemberChanged DataMember 属性值更改后发生。 (继承自 BindingSource。)
公共事件 DataSourceChanged DataSource 属性值更改后发生。 (继承自 BindingSource。)
公共事件 Disposed 当通过调用 Dispose 方法释放组件时发生。 (继承自 Component。)
公共事件 ListChanged 当基础列表更改或列表中的项更改时发生。 (继承自 BindingSource。)
公共事件 PositionChanged Position 属性的值更改后发生。 (继承自 BindingSource。)

页首

显式接口实现  

  名称 说明
显式接口实现私有方法 IBindingList.AddIndex PropertyDescriptor 添加到用于搜索的索引。 (继承自 BindingSource。)
显式接口实现私有方法 ISupportInitialize.BeginInit 用信号通知 BindingSource 初始化即将开始。 (继承自 BindingSource。)
显式接口实现私有方法 ICancelAddNew.CancelNew 丢弃集合中挂起的新项。 (继承自 BindingSource。)
显式接口实现私有方法 ISupportInitialize.EndInit 用信号通知 BindingSource 初始化已完成。 (继承自 BindingSource。)
显式接口实现私有方法 ICancelAddNew.EndNew 向集合提交挂起的新项。 (继承自 BindingSource。)
显式接口实现私有事件 ISupportInitializeNotification.Initialized 初始化 BindingSource 时出现。 (继承自 BindingSource。)
显式接口实现私有属性 ISupportInitializeNotification.IsInitialized 获取一个值,该值指示是否初始化 BindingSource。 (继承自 BindingSource。)
显式接口实现私有方法 IBindingList.RemoveIndex 从用于搜索的索引中移除 System.ComponentModel.PropertyDescriptor。 (继承自 BindingSource。)

页首

备注

有关示例演示如何使用此绑定源,请参见 创建基于 Windows 窗体的域特定语言

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.Modeling.Design 命名空间