protected SearchContentLibraryItemViewModel(LibraryRootViewModel library) : base(library, null) { Model = new BuiltInContentContainer("Search"); Icon = SixIconFont.withSIX_icon_Search; IsFeatured = true; Filter = new ModLibraryFilter(); SetupFilterChanged(); UiHelper.TryOnUiThread(() => { Items.EnableCollectionSynchronization(ItemsLock); _itemsView = Items.CreateCollectionView( new[] { new SortDescription("SearchScore", ListSortDirection.Descending) }, null, null, Filter.Handler, true); }); var sortDatas = new[] { new SortData { DisplayName = "Search score", Value = "SearchScore", SortDirection = ListSortDirection.Descending } }; Sort = new SortViewModel(ItemsView, sortDatas.Concat(Columns).ToArray(), null, RequiredColumns); SetupGrouping(); SortOrder = 3; IsRoot = true; }
protected ContentLibraryItemViewModel(LibraryRootViewModel library, LibraryGroupViewModel @group) : base(@group) { _library = library; }