ObservableCollectionListSource<T> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extends ObservableCollection<T> and adds an explicit implementation of IListSource.
public class ObservableCollectionListSource<T> : System.Collections.ObjectModel.ObservableCollection<T>, System.ComponentModel.IListSource where T : class
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")]
public class ObservableCollectionListSource<T> : System.Collections.ObjectModel.ObservableCollection<T>, System.ComponentModel.IListSource where T : class
type ObservableCollectionListSource<'T (requires 'T : null)> = class
inherit ObservableCollection<'T (requires 'T : null)>
interface IListSource
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")>]
type ObservableCollectionListSource<'T (requires 'T : null)> = class
inherit ObservableCollection<'T (requires 'T : null)>
interface IListSource
Public Class ObservableCollectionListSource(Of T)
Inherits ObservableCollection(Of T)
Implements IListSource
- T
The type of elements in the collection.
- Inheritance
-
ObservableCollectionListSource<T>
- Attributes
- Implements
The method GetList() is implemented to return an IBindingList implementation that stays in sync with the ObservableCollection.
This class can be used to implement navigation properties on entities for use in Windows Forms data binding. For WPF data binding use an ObservableCollection rather than an instance of this class.
See Local views of tracked entities in EF Core for more information and examples.
Observable |
Initializes a new instance of the ObservableCollectionListSource<T> class. |
Observable |
Initializes a new instance of the ObservableCollectionListSource<T> class that contains elements copied from the specified collection. |
Observable |
Initializes a new instance of the ObservableCollectionListSource<T> class that contains elements copied from the specified list. |
IList |
Always false because there is never a contained collection. |
IList |
Returns an IBindingList implementation that stays in sync with this ObservableCollection<T>. The returned list is cached on this object such that the same list is returned each time this method is called. |
To |
Returns a BindingList<T> implementation that stays in sync with the given ObservableCollection<T>. |
Product | Versions |
---|---|
Entity Framework Core | 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
Entity Framework feedback
Entity Framework is an open source project. Select a link to provide feedback: