![Avatar](https://secure.gravatar.com/avatar/cf17079d0c8930edb535d79a7c98c395.jpg?s=64&d=identicon&r=g)
I was wondering what is the best way to create a ShellTreeListBox DataFilter that filters file types/extensions. I would like to display only files that end on .sq or .txt
Thanks
I was wondering what is the best way to create a ShellTreeListBox DataFilter that filters file types/extensions. I would like to display only files that end on .sq or .txt
Thanks
This appears to work:
private IDataFilter _folderExplorerDataFilter = new PredicateFilter(i =>
{
var shellObjectVM = (ShellObjectViewModel)i;
var supportedFileTypes = new[] { ".sq", ".txt" };
return (shellObjectVM.IsFolder) ? true : supportedFileTypes.Any(shellObjectVM.Name.EndsWith);
});
[Modified 3 years ago]
Alright, thank you!
Please log in to a validated account to post comments.