//Inside your XAML <Window.DataContext> <local:FilterElements/> </Window.DataContext> //FilterElements being a class you created