CollectionViewSource.GetDefaultView(Object) Method
Definition
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.
Returns the default view for the given source.
public:
static System::ComponentModel::ICollectionView ^ GetDefaultView(System::Object ^ source);
public static System.ComponentModel.ICollectionView GetDefaultView (object source);
static member GetDefaultView : obj -> System.ComponentModel.ICollectionView
Public Shared Function GetDefaultView (source As Object) As ICollectionView
Parameters
- source
- Object
An object reference to the binding source.
Returns
Returns an ICollectionView object that is the default view for the given source collection.
Remarks
This default view is never affiliated with any CollectionViewSource objects.
All collections have a default CollectionView. WPF always binds to a view rather than a collection. If you bind directly to a collection, WPF actually binds to the default view for that collection. This default view is shared by all bindings to the collection, which causes all direct bindings to the collection to share the sort, filter, group, and current item characteristics of the one default view. Alternatively, you can create a view of your collection in Extensible Application Markup Language (XAML) or code using the CollectionViewSource class, and binding your control to that view. For an example, see How to: Sort and Group Data Using a View in XAML.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기