System.Windows.Data.CollectionViewSource.CollectionViewSource C# (CSharp) Method

CollectionViewSource() public method

public CollectionViewSource ( ) : System
return System
		public CollectionViewSource ()
		{
			CachedViews = new Dictionary<object, ICollectionView> ();
			SortDescriptions = new SortDescriptionCollection ();
			GroupDescriptions = new ObservableCollection<GroupDescription> ();

			GroupDescriptions.CollectionChanged += (o, e) => Refresh ();
			((INotifyCollectionChanged)SortDescriptions).CollectionChanged += (o, e) => Refresh ();
			FilterCallback = (o) => {
				var h = filter;
				if (h != null) {
					var args = new FilterEventArgs (o);
					h (this, args);
					return args.Accepted;
				}
				return true;
			};
		}