Поделиться через


ObservableCollectionExtensions.ToBindingList<T> Метод

Определение

Возвращает реализацию BindingList<T> , которая синхронизируется с заданным ObservableCollection<T>.

public static System.ComponentModel.BindingList<T> ToBindingList<T> (this System.Collections.ObjectModel.ObservableCollection<T> source) where T : class;
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")]
public static System.ComponentModel.BindingList<T> ToBindingList<T> (this System.Collections.ObjectModel.ObservableCollection<T> source) where T : class;
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")]
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Requires calling MakeGenericType on the property descriptor's type")]
public static System.ComponentModel.BindingList<T> ToBindingList<T> (this System.Collections.ObjectModel.ObservableCollection<T> source) where T : class;
static member ToBindingList : System.Collections.ObjectModel.ObservableCollection<'T (requires 'T : null)> -> System.ComponentModel.BindingList<'T (requires 'T : null)> (requires 'T : null)
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")>]
static member ToBindingList : System.Collections.ObjectModel.ObservableCollection<'T (requires 'T : null)> -> System.ComponentModel.BindingList<'T (requires 'T : null)> (requires 'T : null)
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")>]
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Requires calling MakeGenericType on the property descriptor's type")>]
static member ToBindingList : System.Collections.ObjectModel.ObservableCollection<'T (requires 'T : null)> -> System.ComponentModel.BindingList<'T (requires 'T : null)> (requires 'T : null)
<Extension()>
Public Function ToBindingList(Of T As Class) (source As ObservableCollection(Of T)) As BindingList(Of T)

Параметры типа

T

Тип элемента.

Параметры

source
ObservableCollection<T>

Коллекция, с которой остается синхронизированным данный связанный список.

Возвращаемое значение

Связанный список.

Атрибуты

Применяется к