Delen via


ModelingBindingSource Class

A specialized BindingSource for use with VMSDK (DSL Tools) models. Creates a transaction when items are added or removed.

Inheritance Hierarchy

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

Namespace:  Microsoft.VisualStudio.Modeling.Design
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

Syntax

'Declaration
Public Class ModelingBindingSource _
    Inherits BindingSource
public class ModelingBindingSource : BindingSource
public ref class ModelingBindingSource : public BindingSource
type ModelingBindingSource =  
    class 
        inherit BindingSource 
    end
public class ModelingBindingSource extends BindingSource

The ModelingBindingSource type exposes the following members.

Constructors

  Name Description
Public method ModelingBindingSource() Initializes a new instance of the Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource class to the default property values.
Public method ModelingBindingSource(IContainer) Initializes a new instance of the Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource class and adds newly created ModelingBindingSource object to the specified container.
Public method ModelingBindingSource(Object, String) Initializes a new instance of the Microsoft.VisualStudio.Modeling.Design.ModelingBindingSource class with the specified data source and data member.

Top

Properties

  Name Description
Public property AllowEdit Gets a value indicating whether items in the underlying list can be edited. (Inherited from BindingSource.)
Public property AllowNew Is AddNew allowed to be called on this source. (Overrides BindingSource.AllowNew.)
Public property AllowRemove Gets a value indicating whether items can be removed from the underlying list. (Inherited from BindingSource.)
Protected property CanRaiseEvents Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Public property Container Gets the IContainer that contains the Component. (Inherited from Component.)
Public property Count Gets the total number of items in the underlying list, taking the current Filter value into consideration. (Inherited from BindingSource.)
Public property CurrencyManager Gets the currency manager associated with this BindingSource. (Inherited from BindingSource.)
Public property Current Gets the current item in the list. (Inherited from BindingSource.)
Public property DataMember Gets or sets the specific list in the data source to which the connector currently binds to. (Inherited from BindingSource.)
Public property DataSource Gets or sets the data source that the connector binds to. (Inherited from BindingSource.)
Protected property DesignMode Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Protected property Events Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public property Filter Gets or sets the expression used to filter which rows are viewed. (Inherited from BindingSource.)
Public property IsBindingSuspended Gets a value indicating whether the list binding is suspended. (Inherited from BindingSource.)
Public property IsFixedSize Gets a value indicating whether the underlying list has a fixed size. (Inherited from BindingSource.)
Public property IsReadOnly Gets a value indicating whether the underlying list is read-only. (Inherited from BindingSource.)
Public property IsSorted Gets a value indicating whether the items in the underlying list are sorted. (Inherited from BindingSource.)
Public property IsSynchronized Gets a value indicating whether access to the collection is synchronized (thread safe). (Inherited from BindingSource.)
Public property IsValidDataSource True if the data source is a VMSDK ModelElement that is contained in a VMSDK Store.
Public property Item Gets or sets the list item at the specified index. If you set an item, the operation will be performed inside a transaction. (Overrides BindingSource.Item.)
Public property List Gets the list that the connector is bound to. (Inherited from BindingSource.)
Public property Position Gets or sets the index of the current item in the underlying list. (Inherited from BindingSource.)
Public property RaiseListChangedEvents Gets or sets a value indicating whether ListChanged events should be raised. (Inherited from BindingSource.)
Public property Site Gets or sets the ISite of the Component. (Inherited from Component.)
Public property Sort Gets or sets the column names used for sorting, and the sort order for viewing the rows in the data source. (Inherited from BindingSource.)
Public property SortDescriptions Gets the collection of sort descriptions applied to the data source. (Inherited from BindingSource.)
Public property SortDirection Gets the direction the items in the list are sorted. (Inherited from BindingSource.)
Public property SortProperty Infrastructure. Gets the PropertyDescriptor that is being used for sorting the list. (Inherited from BindingSource.)
Public property SupportsAdvancedSorting Gets a value indicating whether the data source supports multi-column sorting. (Inherited from BindingSource.)
Public property SupportsChangeNotification Gets a value indicating whether the data source supports change notification. (Inherited from BindingSource.)
Public property SupportsFiltering Gets a value indicating whether the data source supports filtering. (Inherited from BindingSource.)
Public property SupportsSearching Gets a value indicating whether the data source supports searching with the Find method. (Inherited from BindingSource.)
Public property SupportsSorting Gets a value indicating whether the data source supports sorting. (Inherited from BindingSource.)
Public property SyncRoot Gets an object that can be used to synchronize access to the underlying list. (Inherited from BindingSource.)

Top

Methods

  Name Description
Public method Add Adds an existing item to the list. The operation will be performed inside a transaction. (Overrides BindingSource.Add(Object).)
Public method AddNew Adds a new item to the underlying list. (Overrides BindingSource.AddNew().)
Public method ApplySort(ListSortDescriptionCollection) Sorts the data source with the specified sort descriptions. (Inherited from BindingSource.)
Public method ApplySort(PropertyDescriptor, ListSortDirection) Sorts the data source using the specified property descriptor and sort direction. (Inherited from BindingSource.)
Public method CancelEdit Cancels the current edit operation. (Inherited from BindingSource.)
Public method Clear Removes all elements from the list. Performs the operation inside a transaction. (Overrides BindingSource.Clear().)
Public method Contains Determines whether an object is an item in the list. (Inherited from BindingSource.)
Public method CopyTo Copies the contents of the List to the specified array, starting at the specified index value. (Inherited from BindingSource.)
Public method CreateObjRef Security Critical. Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose() Releases all resources used by the Component. (Inherited from Component.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the BindingSource and optionally releases the managed resources. (Inherited from BindingSource.)
Public method EndEdit Applies pending changes to the underlying data source. (Inherited from BindingSource.)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method Find(String, Object) Returns the index of the item in the list with the specified property name and value. (Inherited from BindingSource.)
Public method Find(PropertyDescriptor, Object) Searches for the index of the item that has the given property descriptor. (Inherited from BindingSource.)
Public method GetEnumerator Retrieves an enumerator for the List. (Inherited from BindingSource.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetItemProperties Retrieves an array of PropertyDescriptor objects representing the bindable properties of the data source list type. (Inherited from BindingSource.)
Public method GetLifetimeService Security Critical. Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method GetListName Gets the name of the list supplying data for the binding. (Inherited from BindingSource.)
Public method GetRelatedCurrencyManager Gets the related currency manager for the specified data member. (Inherited from BindingSource.)
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IndexOf Searches for the specified object and returns the index of the first occurrence within the entire list. (Inherited from BindingSource.)
Public method InitializeLifetimeService Security Critical. Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Insert Inserts an item into the list at the specified index. Performs the operation inside a transaction. (Overrides BindingSource.Insert(Int32, Object).)
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method MoveFirst Moves to the first item in the list. (Inherited from BindingSource.)
Public method MoveLast Moves to the last item in the list. (Inherited from BindingSource.)
Public method MoveNext Moves to the next item in the list. (Inherited from BindingSource.)
Public method MovePrevious Moves to the previous item in the list. (Inherited from BindingSource.)
Protected method OnAddingNew Raises the AddingNew event. (Inherited from BindingSource.)
Protected method OnBindingComplete Raises the BindingComplete event. (Inherited from BindingSource.)
Protected method OnCurrentChanged Raises the CurrentChanged event. (Inherited from BindingSource.)
Protected method OnCurrentItemChanged Raises the CurrentItemChanged event. (Inherited from BindingSource.)
Protected method OnDataError Raises the DataError event. (Inherited from BindingSource.)
Protected method OnDataMemberChanged Raises the DataMemberChanged event. (Inherited from BindingSource.)
Protected method OnDataSourceChanged Raises the DataSourceChanged event. (Inherited from BindingSource.)
Protected method OnListChanged When the list has been changed this method is called in order to reset the store event handlers and reset the state of a valid datasource. (Overrides BindingSource.OnListChanged(ListChangedEventArgs).)
Protected method OnPositionChanged Raises the PositionChanged event. (Inherited from BindingSource.)
Protected method OnPropertyChanged Called when a property has changed.
Public method Remove Removes the specified item from the list. Performs the operation inside a transaction. (Overrides BindingSource.Remove(Object).)
Public method RemoveAt Removes the item at the specified index in the list. Performs the operation inside a transaction. (Overrides BindingSource.RemoveAt(Int32).)
Public method RemoveCurrent Removes the current item from the list. (Inherited from BindingSource.)
Public method RemoveFilter Removes the filter associated with the BindingSource. (Inherited from BindingSource.)
Public method RemoveSort Removes the sort associated with the BindingSource. (Inherited from BindingSource.)
Public method ResetAllowNew Infrastructure. Reinitializes the AllowNew property. (Inherited from BindingSource.)
Public method ResetBindings Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values. (Inherited from BindingSource.)
Public method ResetCurrentItem Causes a control bound to the BindingSource to reread the currently selected item and refresh its displayed value. (Inherited from BindingSource.)
Public method ResetItem Causes a control bound to the BindingSource to reread the item at the specified index, and refresh its displayed value. (Inherited from BindingSource.)
Public method ResumeBinding Resumes data binding. (Inherited from BindingSource.)
Public method SuspendBinding Suspends data binding to prevent changes from updating the bound data source. (Inherited from BindingSource.)
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

Top

Events

  Name Description
Public event AddingNew Occurs before an item is added to the underlying list. (Inherited from BindingSource.)
Public event BindingComplete Occurs when all the clients have been bound to this BindingSource. (Inherited from BindingSource.)
Public event CurrentChanged Occurs when the currently bound item changes. (Inherited from BindingSource.)
Public event CurrentItemChanged Occurs when a property value of the Current property has changed. (Inherited from BindingSource.)
Public event DataError Occurs when a currency-related exception is silently handled by the BindingSource. (Inherited from BindingSource.)
Public event DataMemberChanged Occurs when the DataMember property value has changed. (Inherited from BindingSource.)
Public event DataSourceChanged Occurs when the DataSource property value has changed. (Inherited from BindingSource.)
Public event Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public event ListChanged Occurs when the underlying list changes or an item in the list changes. (Inherited from BindingSource.)
Public event PositionChanged Occurs after the value of the Position property has changed. (Inherited from BindingSource.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IBindingList.AddIndex Adds the PropertyDescriptor to the indexes used for searching. (Inherited from BindingSource.)
Explicit interface implemetationPrivate method ISupportInitialize.BeginInit Signals the BindingSource that initialization is starting. (Inherited from BindingSource.)
Explicit interface implemetationPrivate method ICancelAddNew.CancelNew Discards a pending new item from the collection. (Inherited from BindingSource.)
Explicit interface implemetationPrivate method ISupportInitialize.EndInit Signals the BindingSource that initialization is complete. (Inherited from BindingSource.)
Explicit interface implemetationPrivate method ICancelAddNew.EndNew Commits a pending new item to the collection. (Inherited from BindingSource.)
Explicit interface implemetationPrivate event ISupportInitializeNotification.Initialized Occurs when the BindingSource is initialized. (Inherited from BindingSource.)
Explicit interface implemetationPrivate property ISupportInitializeNotification.IsInitialized Gets a value indicating whether the BindingSource is initialized. (Inherited from BindingSource.)
Explicit interface implemetationPrivate method IBindingList.RemoveIndex Removes the System.ComponentModel.PropertyDescriptor from the indexes used for searching. (Inherited from BindingSource.)

Top

Remarks

For an example of how to use this binding source, see Creating a Windows Forms-Based Domain-Specific Language.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Modeling.Design Namespace