Show / Hide Table of Contents

Class CollectionViewSource

The XAML proxy of a collection view class.

Inheritance
System.Object
DependencyObject
CollectionViewSource
Implements
System.ComponentModel.ISupportInitialize
Inherited Members
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Data
Assembly: OpenSilver.dll
Syntax
public class CollectionViewSource : DependencyObject, IDependencyObject, ISupportInitialize

Constructors

| Improve this Doc View Source

CollectionViewSource()

Initializes a new instance of the CollectionViewSource class.

Declaration
public CollectionViewSource()

Fields

| Improve this Doc View Source

SourceProperty

Identifies Source dependency property.

Declaration
public static readonly DependencyProperty SourceProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ViewProperty

Identifies the View dependency property.

Declaration
public static readonly DependencyProperty ViewProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

Culture

Gets or sets the cultural information for any operations of the view that might differ by culture, such as sorting.

Declaration
public CultureInfo Culture { get; set; }
Property Value
Type Description
System.Globalization.CultureInfo
| Improve this Doc View Source

GroupDescriptions

Gets a collection of GroupDescription objects that describe how items in the collection are grouped in the view.

Declaration
public ObservableCollection<GroupDescription> GroupDescriptions { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<GroupDescription>
| Improve this Doc View Source

SortDescriptions

Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.

Declaration
public SortDescriptionCollection SortDescriptions { get; }
Property Value
Type Description
SortDescriptionCollection
| Improve this Doc View Source

Source

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

Declaration
public object Source { get; set; }
Property Value
Type Description
System.Object

The collection object from which to create this view. The default is null.

Exceptions
Type Condition
System.ArgumentException

The specified value when setting this property is not null or an System.Collections.IEnumerable implementation.-or-The specified value when setting this property is an ICollectionView implementation.

System.InvalidOperationException

The specified value implements ICollectionViewFactory but its CreateView() method returns an ICollectionView with one or more of the following inconsistencies:CanFilter is false but Filter is not null.CanSort is false but SortDescriptions is not empty.CanGroup is false but GroupDescriptions is not empty.

| Improve this Doc View Source

View

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

Declaration
public ICollectionView View { get; }
Property Value
Type Description
ICollectionView

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

Methods

| Improve this Doc View Source

DeferRefresh()

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

Declaration
public IDisposable DeferRefresh()
Returns
Type Description
System.IDisposable
| Improve this Doc View Source

OnCollectionViewTypeChanged(Type, Type)

Invoked when the collection view type changes.

Declaration
protected virtual void OnCollectionViewTypeChanged(Type oldCollectionViewType, Type newCollectionViewType)
Parameters
Type Name Description
System.Type oldCollectionViewType

The old collection view type.

System.Type newCollectionViewType

The new collection view type.

| Improve this Doc View Source

OnSourceChanged(Object, Object)

Invoked when the Source property changes.

Declaration
protected virtual void OnSourceChanged(object oldSource, object newSource)
Parameters
Type Name Description
System.Object oldSource

The old value of the Source property.

System.Object newSource

The new value of the Source property.

Events

| Improve this Doc View Source

Filter

Provides filtering logic.

Declaration
public event FilterEventHandler Filter
Event Type
Type Description
FilterEventHandler
Exceptions
Type Condition
System.InvalidOperationException

When adding a handler to this event, the View property value has a CanFilter property value of false.

Explicit Interface Implementations

| Improve this Doc View Source

ISupportInitialize.BeginInit()

Signals the object that initialization is starting.

Declaration
void ISupportInitialize.BeginInit()
| Improve this Doc View Source

ISupportInitialize.EndInit()

Signals the object that initialization is complete.

Declaration
void ISupportInitialize.EndInit()

Implements

System.ComponentModel.ISupportInitialize

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source