forked from snoopwpf/snoopwpf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SetFiltersWindow.xaml
86 lines (78 loc) · 4.93 KB
/
SetFiltersWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<Window x:Class="Snoop.DebugListenerTab.SetFiltersWindow"
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Snoop.Converters"
Title="SetFiltersWindow" Height="300" Width="400">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!--<StackPanel>-->
<ListBox Name="listBoxFilters" ItemsSource="{Binding Path=Filters}" SelectionMode="Extended" AlternationCount="2">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Name="menuItemGroupFilters" Click="menuItemGroupFilters_Click">
<MenuItem.Header>
<TextBlock Text="Group Filters" />
</MenuItem.Header>
</MenuItem>
<MenuItem Name="menuItemClearFilterGroups" Click="menuItemClearFilterGroups_Click">
<MenuItem.Header>
<TextBlock Text="Clear Filter Groups" />
</MenuItem.Header>
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsGrouped}" Value="True">
<Setter Property="Background" Value="#FFEAEAEA" />
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" Name="stackPanelFilter">
<ComboBox Width="100" Height="23" Name="comboBoxFilterTypes" SelectedIndex="{Binding Path=FilterType, Mode=TwoWay,Converter={x:Static converters:FilterTypeToIntConverter.Default}}">
<ComboBoxItem Content="Starts With" />
<ComboBoxItem Content="Ends With" />
<ComboBoxItem Content="Contains" />
<ComboBoxItem Content="Regular Expression" />
</ComboBox>
<TextBox Name="textBlockFilter" Loaded="textBlockFilter_Loaded" Width="150" Height="23" Margin="10,0,0,0" Text="{Binding Path=Text, Mode=TwoWay}" />
<Button Name="buttonRemoveFilter" Margin="10,0,0,0" Width="14" Height="14" Click="buttonRemoveFilter_Click">
<Grid>
<Path
Stretch="Fill"
Stroke="Black"
StrokeThickness="2"
Data="M18.33996,8.7972167 L1.8622991,25.274878" />
<Path
Stretch="Fill"
Stroke="Black"
StrokeThickness="2"
Data="M19.831014,18.751491 L4.5959764,3.5164535" />
</Grid>
</Button>
<TextBlock Foreground="Black" Text="{Binding Path=GroupId}" Margin="5,3,0,0" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Margin="0,10,0,0" Grid.Row="1" VerticalAlignment="Bottom" Name="buttonAddFilter" Click="buttonAddFilter_Click" Content="Add Another Filter" Width="110" Height="25" HorizontalAlignment="Left" />
<!--</StackPanel>-->
</Grid>
<!--<StackPanel Orientation="Horizontal" Grid.Row="1">-->
<Button Name="buttonSetFilter" Margin="10,0,0,0" Grid.Row="1" HorizontalAlignment="Left" Height="25" Width="110" Content="Set Filter" Click="buttonSetFilter_Click" />
<!--<Button Name="buttonSaveFilter" Margin="10,0,0,0" Grid.Row="1" HorizontalAlignment="Left" Height="25" Width="110" Content="Save Filter" Click="buttonSaveFilter_Click" />-->
<!--</StackPanel>-->
</Grid>
</Window>