Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CollectionViewSource Class

 

The Extensible Application Markup Language (XAML) proxy of a CollectionView class.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

System.Object
  System.Windows.Threading.DispatcherObject
    System.Windows.DependencyObject
      System.Windows.Data.CollectionViewSource

public class CollectionViewSource : DependencyObject, ISupportInitialize, 
	IWeakEventListener

NameDescription
System_CAPS_pubmethodCollectionViewSource()

Initializes a new instance of the CollectionViewSource class.

NameDescription
System_CAPS_pubpropertyCanChangeLiveFiltering

Gets a value that indicates whether the collection view supports turning filtering data in real time on or off.

System_CAPS_pubpropertyCanChangeLiveGrouping

Gets a value that indicates whether the collection view supports turning grouping data in real time on or off.

System_CAPS_pubpropertyCanChangeLiveSorting

Gets a value that indicates whether the collection view supports turning sorting data in real time on or off.

System_CAPS_pubpropertyCollectionViewType

Gets or sets the desired view type.

System_CAPS_pubpropertyCulture

Gets or sets the culture that is used for operations such as sorting and comparisons.

System_CAPS_pubpropertyDependencyObjectType

Gets the DependencyObjectType that wraps the CLR type of this instance. (Inherited from DependencyObject.)

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

System_CAPS_pubpropertyGroupDescriptions

Gets or sets a collection of GroupDescription objects that describes how the items in the collection are grouped in the view.

System_CAPS_pubpropertyIsLiveFiltering

Gets a value that indicates whether the CollectionViewSource is filtering data in real time.

System_CAPS_pubpropertyIsLiveFilteringRequested

Gets or sets a value that indicates whether CollectionViewSource should filter the data in real time if it can.

System_CAPS_pubpropertyIsLiveGrouping

Gets a value that indicates whether the CollectionViewSource groups data in real time.

System_CAPS_pubpropertyIsLiveGroupingRequested

Gets or sets a value that indicates whether CollectionViewSource should group the data in real time if it can.

System_CAPS_pubpropertyIsLiveSorting

Gets a value that indicates whether the CollectionViewSource sorts data in real time.

System_CAPS_pubpropertyIsLiveSortingRequested

Gets or sets a value that indicates whether CollectionViewSource should sort the data in real time if it can.

System_CAPS_pubpropertyIsSealed

Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)

System_CAPS_pubpropertyLiveFilteringProperties

Gets a collection of strings that specify the properties that participate in filtering data in real time.

System_CAPS_pubpropertyLiveGroupingProperties

Gets a collection of strings that specify the properties that participate in grouping data in real time.

System_CAPS_pubpropertyLiveSortingProperties

Gets a collection of strings that specify the properties that participate in sorting data in real time.

System_CAPS_pubpropertySortDescriptions

Gets or sets a collection of SortDescription objects that describes how the items in the collection are sorted in the view.

System_CAPS_pubpropertySource

Gets or sets the collection object from which to create this view.

System_CAPS_pubpropertyView

Gets the view object that is currently associated with this instance of CollectionViewSource.

NameDescription
System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_pubmethodClearValue(DependencyProperty)

Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject.)

System_CAPS_pubmethodClearValue(DependencyPropertyKey)

Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject.)

System_CAPS_pubmethodCoerceValue(DependencyProperty)

Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.(Inherited from DependencyObject.)

System_CAPS_pubmethodDeferRefresh()

Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.

System_CAPS_pubmethodEquals(Object)

Determines whether a provided DependencyObject is equivalent to the current DependencyObject.(Inherited from DependencyObject.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetDefaultView(Object)

Returns the default view for the given source.

System_CAPS_pubmethodGetHashCode()

Gets a hash code for this DependencyObject.(Inherited from DependencyObject.)

System_CAPS_pubmethodGetLocalValueEnumerator()

Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetValue(DependencyProperty)

Returns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject.)

System_CAPS_pubmethodInvalidateProperty(DependencyProperty)

Re-evaluates the effective value for the specified dependency property(Inherited from DependencyObject.)

System_CAPS_pubmethodSystem_CAPS_staticIsDefaultView(ICollectionView)

Returns a value that indicates whether the given view is the default view for the Source collection.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnCollectionViewTypeChanged(Type, Type)

Invoked when the CollectionViewType property changes.

System_CAPS_protmethodOnPropertyChanged(DependencyPropertyChangedEventArgs)

Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data. (Inherited from DependencyObject.)

System_CAPS_protmethodOnSourceChanged(Object, Object)

Invoked when the Source property changes.

System_CAPS_pubmethodReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if it exists. (Inherited from DependencyObject.)

System_CAPS_protmethodReceiveWeakEvent(Type, Object, EventArgs)

Handles events from the centralized event table.

System_CAPS_pubmethodSetCurrentValue(DependencyProperty, Object)

Sets the value of a dependency property without changing its value source. (Inherited from DependencyObject.)

System_CAPS_pubmethodSetValue(DependencyProperty, Object)

Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject.)

System_CAPS_pubmethodSetValue(DependencyPropertyKey, Object)

Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property. (Inherited from DependencyObject.)

System_CAPS_protmethodShouldSerializeProperty(DependencyProperty)

Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.(Inherited from DependencyObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodVerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticCanChangeLiveFilteringProperty

Identifies the CanChangeLiveFiltering dependency property.

System_CAPS_pubfieldSystem_CAPS_staticCanChangeLiveGroupingProperty

Identifies the CanChangeLiveGrouping dependency property.

System_CAPS_pubfieldSystem_CAPS_staticCanChangeLiveSortingProperty

Identifies the CanChangeLiveSorting dependency property.

System_CAPS_pubfieldSystem_CAPS_staticCollectionViewTypeProperty

Identifies the CollectionViewType dependency property.

System_CAPS_pubfieldSystem_CAPS_staticIsLiveFilteringProperty

Identifies the IsLiveFiltering dependency property.

System_CAPS_pubfieldSystem_CAPS_staticIsLiveFilteringRequestedProperty

Identifies the IsLiveFilteringRequested dependency property.

System_CAPS_pubfieldSystem_CAPS_staticIsLiveGroupingProperty

Identifies the IsLiveGrouping dependency property.

System_CAPS_pubfieldSystem_CAPS_staticIsLiveGroupingRequestedProperty

Identifies the IsLiveGroupingRequested dependency property.

System_CAPS_pubfieldSystem_CAPS_staticIsLiveSortingProperty

Identifies the IsLiveSorting dependency property.

System_CAPS_pubfieldSystem_CAPS_staticIsLiveSortingRequestedProperty

Identifies the IsLiveSortingRequested dependency property.

System_CAPS_pubfieldSystem_CAPS_staticSourceProperty

Identifies the Source dependency property.

System_CAPS_pubfieldSystem_CAPS_staticViewProperty

Identifies the CollectionViewType dependency property.

NameDescription
System_CAPS_pubeventFilter

Provides filtering logic.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodISupportInitialize.BeginInit()

This API supports the product infrastructure and is not intended to be used directly from your code. Signals the object that initialization is starting.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISupportInitialize.EndInit()

This API supports the product infrastructure and is not intended to be used directly from your code. Signals the object that initialization is complete.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIWeakEventListener.ReceiveWeakEvent(Type, Object, EventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Receives events from the centralized event manager.

CollectionViewSource is a proxy for a CollectionView class, or a class derived from CollectionView. CollectionViewSource enables XAML code to set the commonly used CollectionView properties, passing these settings to the underlying view. CollectionViewSource has a View property that holds the actual view and a Source property that holds the source collection.

You can think of a collection view as the layer on top of the binding source collection that allows you to navigate and display the collection based on sort, filter, and group queries, all without having to manipulate the underlying source collection itself. If the source collection implements the INotifyCollectionChanged interface, the changes raised by the CollectionChanged event are propagated to the views.

Because views do not change the underlying source collections, each source collection can have multiple views associated with it. For example, you may have a collection of Task objects. With the use of views, you can display that same data in different ways. For example, on the left side of your page you may want to show tasks sorted by priority, and on the right side, grouped by area.

For more information, see the Binding to Collections section in the Data Binding Overview.

.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0

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

Return to top
Show:
© 2016 Microsoft