Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Merging is hard
Browse files Browse the repository at this point in the history
  • Loading branch information
jfversluis committed Feb 4, 2021
1 parent ed2d974 commit 40a2bb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions samples/XCT.Sample/ViewModels/Base/BaseGalleryViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Input;
using Xamarin.CommunityToolkit.ObjectModel;
using Xamarin.CommunityToolkit.Sample.Models;

namespace Xamarin.CommunityToolkit.Sample.ViewModels
Expand All @@ -10,6 +11,7 @@ public abstract class BaseGalleryViewModel : BaseViewModel
{
public BaseGalleryViewModel()
{
Items = CreateItems().OrderBy(x => x.Title).ToList();
Filter();
FilterCommand = CommandFactory.Create(Filter);
}
Expand All @@ -20,6 +22,8 @@ public BaseGalleryViewModel()

public string FilterValue { private get; set; }

public IEnumerable<SectionModel> FilteredItems { get; private set; }

protected abstract IEnumerable<SectionModel> CreateItems();

void Filter()
Expand Down

0 comments on commit 40a2bb8

Please sign in to comment.