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.
try creating CollectionViewSource and setting its filtering logic like this:
//create it as static resource and bind your ItemsControl to it
<CollectionViewSource x:Key="csv" Source="{StaticResource MotionSequenceCollection}"
Filter="CollectionViewSource_Filter">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="YYY"/>
</CollectionViewSource.GroupDescriptions>
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="YYY" Direction="Ascending"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
{
var t = e.Item as ModelBase;
if (t != null)
{
//use your filtering logic here
}
}