Hi
I am new in WPF.
As you see in this picture:
http://api.ning.com/files/3FX8CRo2Q3IZ...
I have a textbox that filters items of listbox.
This is my WPF code:
<Grid>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="28,31,0,0" Name="textBlock1" Text="Filter Tags:" VerticalAlignment="Top" />
<TextBox Text="{Binding Path=FilterText,Mode=TwoWay}" Height="23" HorizontalAlignment="Left" Margin="91,28,0,0" Name="textBoxFilterTags" VerticalAlignment="Top" Width="120" TextChanged="textBoxFilterTags_TextChanged" />
<ListBox ItemsSource="{Binding Path=Filter}" Height="178" HorizontalAlignment="Left" Margin="12,71,0,0" Name="listBoxTags" VerticalAlignment="Top" Width="254">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding Path=Tick,Mode=TwoWay}" Margin="3,1,1,1" />
<TextBlock Text="{Binding Path=Name}" Margin="3,1,1,1" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
my listbox is binded to a property called:
public ObservableCollection<tagtick> Filter
{
get
{
....
}
}
Now, my problem is that when I type in the filter text, the listbox should update the filter. I tried using UpdateSourceTrigger but it didnt work. can some one tell me how to trigger the binding update when the text of textbox change?
Thanks in advance.