0 out of 1 rated this helpful - Rate this topic

IListSource Interface

Provides functionality to an object to return a list that can be bound to a data source.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)
[TypeConverterAttribute(L"System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public interface class IListSource

The IListSource type exposes the following members.

  NameDescription
Public propertySupported by the XNA FrameworkContainsListCollectionGets a value indicating whether the collection is a collection of IList objects.
Top
  NameDescription
Public methodSupported by the XNA FrameworkGetListReturns an IList that can be bound to a data source from an object that does not implement an IList itself.
Top

You typically use this interface to return a list that can be bound to a data source, from an object that does not implement IList itself.

Binding to data can occur at either run time or in a designer, but there are rules for each. At run time, you can bind to data in any of the following:

  • Array

  • Implementer of IList, provided the implementer has a strongly typed Item property (that is, the Type is anything but Object). You can accomplish this by making the default implementation of Item private. If you want to create an IList that follows the rules of a strongly typed collection, you should derive from CollectionBase.

  • Implementer of ITypedList.

In a designer, you can initialize binding to Component objects by following the same rules.

NoteNote

Implementers of IListSource can return an IList that contains a collection of IList objects.

The following code example demonstrates how to implement the IListSource interface. A component named EmployeeListSource exposes an IList for data binding by implementing the GetList method. For a full code listing, see How to: Implement the IListSource Interface.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.