Skip to content

Instantly share code, notes, and snippets.

View sdenchev's full-sized avatar

Stefan Denchev sdenchev

View GitHub Profile
@sdenchev
sdenchev / MainWindow.xaml
Last active July 25, 2023 21:42
WPF filtering with CollectionView
<Window x:Class="Filtering.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:Filtering"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<l:MainWindowViewModel x:Key="ViewModel"/>
</Window.Resources>
<Grid DataContext="{StaticResource ViewModel}">
<ListView ItemsSource="{Binding Collection}"/>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Windows;
using System.Windows.Controls;