<Window x:Class="ProgrammaticFilter.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
	xmlns:local="clr-namespace:ProgrammaticFilter"
    Title="Window1" Height="300" Width="300">
    <Window.Resources>
        <local:StringContainsFilterDescription x:Key="SenderFilter" PropertyName="Sender" />
        <local:StringContainsFilterDescription x:Key="SubjectFilter" PropertyName="Subject" />
    </Window.Resources>
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition Height="0.152*"/>
    		<RowDefinition Height="0.152*"/>
    		<RowDefinition Height="0.152*"/>
            <RowDefinition Height="0.848*"/>
    	</Grid.RowDefinitions>
        <TextBox Grid.Row="0" Text="{Binding Source={StaticResource SenderFilter}, Path=FilterValue}"></TextBox>
        <TextBox Grid.Row="1" Text="{Binding Source={StaticResource SubjectFilter}, Path=FilterValue}"></TextBox>
        <Button Content="Filter" Grid.Row="2" x:Name="filterButton" Click="filterButton_Click"/>
        <telerik:RadGridView Name="RadGridView1" Grid.Row="3" />
    </Grid>
</Window>
