-
Notifications
You must be signed in to change notification settings - Fork 0
/
Search.xaml
43 lines (43 loc) · 1.9 KB
/
Search.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
<Window x:Class="SylverInk.Search"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SylverInk"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:ContextSettings}"
Background="{Binding MenuBackground}" Foreground="{Binding MenuForeground}" Height="525" MinHeight="275" MinWidth="350" MouseLeftButtonDown="Drag" ResizeMode="NoResize" Title="Sylver Ink: Search" Width="350">
<Window.Resources>
<ContextMenu x:Key="NoteContextMenu">
<MenuItem Header="Note" Focusable="False" IsEnabled="False"/>
<Separator Focusable="False" Margin="0,5"/>
<MenuItem Header="Delete" Click="NoteDelete"/>
<MenuItem Header="Open..." Click="NoteOpen"/>
</ContextMenu>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel>
<Label Content="Search text" FontStyle="Italic" HorizontalAlignment="Right" Margin="0,20,40,0"/>
<TextBox Margin="20,0" x:Name="SearchText"/>
<Grid Margin="0,50,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Click="QueryClick" Content="Query" x:Name="DoQuery"/>
<Button Click="CloseClick" Grid.Column="1" Content="Close"/>
</Grid>
</StackPanel>
<ListBox AlternationCount="2" ContextMenu="{StaticResource NoteContextMenu}" ItemsSource="{Binding SearchResults}" Margin="20,0,20,20" MouseDoubleClick="SublistOpen" SelectionChanged="SublistChanged" Grid.Row="1" x:Name="Results">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Preview}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>