Hi,
I am writing a simple WPF application to display log file data. I have successfully databound to my events collection, and used various style triggers to style the grid (different background colours for different event types etc).
I now wish to add buttons to show/hide different event types (warning, error, information, etc). I can hide Debug events for example using the following trigger:
<Style TargetType="{x:Type DataGridRow}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Type}" Value="Debug">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
This is static however. How do I hook this up to a button event to enable / disable the visual style, thus showing / hiding the events in the grid?
Or is there a better way of doing it?