1
- <Window
2
- x : Class =" Flow.Launcher.MainWindow"
1
+ <Window x : Class =" Flow.Launcher.MainWindow"
3
2
xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
3
xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
5
4
xmlns : converters =" clr-namespace:Flow.Launcher.Converters"
36
35
<Window .Resources>
37
36
<converters : QuerySuggestionBoxConverter x : Key =" QuerySuggestionBoxConverter" />
38
37
<converters : BorderClipConverter x : Key =" BorderClipConverter" />
38
+ <BooleanToVisibilityConverter x : Key =" BooleanToVisibilityConverter" />
39
39
</Window .Resources>
40
40
<Window .InputBindings>
41
- <KeyBinding Key =" Escape" Command =" {Binding EscCommand}" />
42
- <KeyBinding Key =" F1" Command =" {Binding StartHelpCommand}" />
43
- <KeyBinding Key =" F5" Command =" {Binding ReloadPluginDataCommand}" />
44
- <KeyBinding Key =" Tab" Command =" {Binding AutocompleteQueryCommand}" />
45
- <KeyBinding
46
- Key =" Tab"
41
+ <KeyBinding Key =" Escape"
42
+ Command =" {Binding EscCommand}" />
43
+ <KeyBinding Key =" F1"
44
+ Command =" {Binding StartHelpCommand}" />
45
+ <KeyBinding Key =" F5"
46
+ Command =" {Binding ReloadPluginDataCommand}" />
47
+ <KeyBinding Key =" Tab"
48
+ Command =" {Binding AutocompleteQueryCommand}" />
49
+ <KeyBinding Key =" Tab"
47
50
Command =" {Binding AutocompleteQueryCommand}"
48
51
Modifiers =" Shift" />
49
- <KeyBinding
50
- Key =" I"
52
+ <KeyBinding Key =" I"
51
53
Command =" {Binding OpenSettingCommand}"
52
54
Modifiers =" Ctrl" />
53
- <KeyBinding
54
- Key =" N"
55
+ <KeyBinding Key =" N"
55
56
Command =" {Binding SelectNextItemCommand}"
56
57
Modifiers =" Ctrl" />
57
- <KeyBinding
58
- Key =" J"
58
+ <KeyBinding Key =" J"
59
59
Command =" {Binding SelectNextItemCommand}"
60
60
Modifiers =" Ctrl" />
61
- <KeyBinding
62
- Key =" D"
61
+ <KeyBinding Key =" D"
63
62
Command =" {Binding SelectNextPageCommand}"
64
63
Modifiers =" Ctrl" />
65
- <KeyBinding
66
- Key =" P"
64
+ <KeyBinding Key =" P"
67
65
Command =" {Binding SelectPrevItemCommand}"
68
66
Modifiers =" Ctrl" />
69
- <KeyBinding
70
- Key =" K"
67
+ <KeyBinding Key =" K"
71
68
Command =" {Binding SelectPrevItemCommand}"
72
69
Modifiers =" Ctrl" />
73
- <KeyBinding
74
- Key =" U"
70
+ <KeyBinding Key =" U"
75
71
Command =" {Binding SelectPrevPageCommand}"
76
72
Modifiers =" Ctrl" />
77
- <KeyBinding
78
- Key =" Home"
73
+ <KeyBinding Key =" Home"
79
74
Command =" {Binding SelectFirstResultCommand}"
80
75
Modifiers =" Alt" />
81
- <KeyBinding
82
- Key =" O"
76
+ <KeyBinding Key =" O"
83
77
Command =" {Binding LoadContextMenuCommand}"
84
78
Modifiers =" Ctrl" />
85
- <KeyBinding Key =" Right" Command =" {Binding LoadContextMenuCommand}" />
86
- <KeyBinding Key =" Left" Command =" {Binding EscCommand}" />
87
- <KeyBinding
88
- Key =" H"
79
+ <KeyBinding Key =" Right"
80
+ Command =" {Binding LoadContextMenuCommand}" />
81
+ <KeyBinding Key =" Left"
82
+ Command =" {Binding EscCommand}" />
83
+ <KeyBinding Key =" H"
89
84
Command =" {Binding LoadHistoryCommand}"
90
85
Modifiers =" Ctrl" />
91
- <KeyBinding
92
- Key =" Enter"
86
+ <KeyBinding Key =" Enter"
93
87
Command =" {Binding OpenResultCommand}"
94
88
Modifiers =" Ctrl+Shift" />
95
- <KeyBinding
96
- Key =" Enter"
89
+ <KeyBinding Key =" Enter"
97
90
Command =" {Binding LoadContextMenuCommand}"
98
91
Modifiers =" Shift" />
99
- <KeyBinding Key =" Enter" Command = " {Binding OpenResultCommand} " />
100
- < KeyBinding
101
- Key =" Enter"
92
+ <KeyBinding Key =" Enter"
93
+ Command = " {Binding OpenResultCommand} " />
94
+ < KeyBinding Key =" Enter"
102
95
Command =" {Binding OpenResultCommand}"
103
96
Modifiers =" Ctrl" />
104
- <KeyBinding
105
- Key =" Enter"
97
+ <KeyBinding Key =" Enter"
106
98
Command =" {Binding OpenResultCommand}"
107
99
Modifiers =" Alt" />
108
- <KeyBinding
109
- Key =" D1"
100
+ <KeyBinding Key =" D1"
110
101
Command =" {Binding OpenResultCommand}"
111
102
CommandParameter =" 0"
112
103
Modifiers =" {Binding OpenResultCommandModifiers}" />
113
- <KeyBinding
114
- Key =" D2"
104
+ <KeyBinding Key =" D2"
115
105
Command =" {Binding OpenResultCommand}"
116
106
CommandParameter =" 1"
117
107
Modifiers =" {Binding OpenResultCommandModifiers}" />
118
- <KeyBinding
119
- Key =" D3"
108
+ <KeyBinding Key =" D3"
120
109
Command =" {Binding OpenResultCommand}"
121
110
CommandParameter =" 2"
122
111
Modifiers =" {Binding OpenResultCommandModifiers}" />
123
- <KeyBinding
124
- Key =" D4"
112
+ <KeyBinding Key =" D4"
125
113
Command =" {Binding OpenResultCommand}"
126
114
CommandParameter =" 3"
127
115
Modifiers =" {Binding OpenResultCommandModifiers}" />
128
- <KeyBinding
129
- Key =" D5"
116
+ <KeyBinding Key =" D5"
130
117
Command =" {Binding OpenResultCommand}"
131
118
CommandParameter =" 4"
132
119
Modifiers =" {Binding OpenResultCommandModifiers}" />
133
- <KeyBinding
134
- Key =" D6"
120
+ <KeyBinding Key =" D6"
135
121
Command =" {Binding OpenResultCommand}"
136
122
CommandParameter =" 5"
137
123
Modifiers =" {Binding OpenResultCommandModifiers}" />
138
- <KeyBinding
139
- Key =" D7"
124
+ <KeyBinding Key =" D7"
140
125
Command =" {Binding OpenResultCommand}"
141
126
CommandParameter =" 6"
142
127
Modifiers =" {Binding OpenResultCommandModifiers}" />
143
- <KeyBinding
144
- Key =" D8"
128
+ <KeyBinding Key =" D8"
145
129
Command =" {Binding OpenResultCommand}"
146
130
CommandParameter =" 7"
147
131
Modifiers =" {Binding OpenResultCommandModifiers}" />
148
- <KeyBinding
149
- Key =" D9"
132
+ <KeyBinding Key =" D9"
150
133
Command =" {Binding OpenResultCommand}"
151
134
CommandParameter =" 8"
152
135
Modifiers =" {Binding OpenResultCommandModifiers}" />
153
- <KeyBinding
154
- Key =" D0"
136
+ <KeyBinding Key =" D0"
155
137
Command =" {Binding OpenResultCommand}"
156
138
CommandParameter =" 9"
157
139
Modifiers =" {Binding OpenResultCommandModifiers}" />
158
140
</Window .InputBindings>
159
141
<Grid >
160
- <Border MouseDown =" OnMouseDown" Style =" {DynamicResource WindowBorderStyle}" >
142
+ <Border MouseDown =" OnMouseDown"
143
+ Style =" {DynamicResource WindowBorderStyle}" >
161
144
<StackPanel Orientation =" Vertical" >
162
145
<Grid >
163
- <TextBox
164
- x : Name =" QueryTextSuggestionBox"
146
+ <TextBox x : Name =" QueryTextSuggestionBox"
165
147
IsEnabled =" False"
166
148
Style =" {DynamicResource QuerySuggestionBoxStyle}" >
167
149
<TextBox .Text>
168
150
<MultiBinding Converter =" {StaticResource QuerySuggestionBoxConverter}" >
169
- <Binding ElementName =" QueryTextBox" Mode =" OneTime" />
170
- <Binding ElementName =" ResultListBox" Path =" SelectedItem" />
171
- <Binding ElementName =" QueryTextBox" Path =" Text" />
151
+ <Binding ElementName =" QueryTextBox"
152
+ Mode =" OneTime" />
153
+ <Binding ElementName =" ResultListBox"
154
+ Path =" SelectedItem" />
155
+ <Binding ElementName =" QueryTextBox"
156
+ Path =" Text" />
172
157
</MultiBinding >
173
158
</TextBox .Text>
174
159
</TextBox >
175
- <TextBox
176
- x : Name =" QueryTextBox"
160
+ <TextBox x : Name =" QueryTextBox"
177
161
AllowDrop =" True"
178
162
Background =" Transparent"
179
163
PreviewDragOver =" OnPreviewDragOver"
182
166
PreviewKeyUp =" QueryTextBox_KeyUp"
183
167
Visibility =" Visible" >
184
168
<TextBox .CommandBindings>
185
- <CommandBinding Command =" ApplicationCommands.Copy" Executed =" OnCopy" />
169
+ <CommandBinding Command =" ApplicationCommands.Copy"
170
+ Executed =" OnCopy" />
186
171
</TextBox .CommandBindings>
187
172
<TextBox .ContextMenu>
188
173
<ContextMenu >
189
- <MenuItem Command =" ApplicationCommands.Cut" Header =" {DynamicResource cut}" />
190
- <MenuItem Command =" ApplicationCommands.Copy" Header =" {DynamicResource copy}" />
191
- <MenuItem Command =" ApplicationCommands.Paste" Header =" {DynamicResource paste}" />
192
- <Separator
193
- Margin =" 0"
174
+ <MenuItem Command =" ApplicationCommands.Cut"
175
+ Header =" {DynamicResource cut}" />
176
+ <MenuItem Command =" ApplicationCommands.Copy"
177
+ Header =" {DynamicResource copy}" />
178
+ <MenuItem Command =" ApplicationCommands.Paste"
179
+ Header =" {DynamicResource paste}" />
180
+ <Separator Margin =" 0"
194
181
Padding =" 0,4,0,4"
195
182
Background =" {DynamicResource ContextSeparator}" />
196
- <MenuItem Click =" OnContextMenusForSettingsClick" Header =" {DynamicResource flowlauncher_settings}" />
197
- <MenuItem Command =" {Binding EscCommand}" Header =" {DynamicResource closeWindow}" />
183
+ <MenuItem Click =" OnContextMenusForSettingsClick"
184
+ Header =" {DynamicResource flowlauncher_settings}" />
185
+ <MenuItem Command =" {Binding EscCommand}"
186
+ Header =" {DynamicResource closeWindow}" />
198
187
</ContextMenu >
199
188
</TextBox .ContextMenu>
200
189
</TextBox >
201
190
202
- <StackPanel x : Name =" ClockPanel" Style =" {DynamicResource ClockPanel}" IsHitTestVisible =" False" >
203
- <TextBlock x : Name =" DateBox" Style =" {DynamicResource DateBox}" />
204
- <TextBlock x : Name =" ClockBox" Style =" {DynamicResource ClockBox}" />
191
+ <StackPanel x : Name =" ClockPanel"
192
+ Style =" {DynamicResource ClockPanel}"
193
+ IsHitTestVisible =" False" >
194
+ <TextBlock
195
+ Visibility =" {Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}"
196
+ Style =" {DynamicResource DateBox}"
197
+ Text =" {Binding DateText}" />
198
+ <TextBlock Style =" {DynamicResource ClockBox}"
199
+ Visibility =" {Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}"
200
+ Text =" {Binding ClockText}" />
205
201
</StackPanel >
206
202
207
203
<Canvas Style =" {DynamicResource SearchIconPosition}" >
208
- <Image
209
- x : Name =" PluginActivationIcon"
204
+ <Image x : Name =" PluginActivationIcon"
210
205
Width =" 32"
211
206
Height =" 32"
212
207
Margin =" 0,0,0,0"
217
212
Source =" {Binding PluginIconPath}"
218
213
Stretch =" Uniform"
219
214
Style =" {DynamicResource PluginActivationIcon}" />
220
- <Path
221
- Name =" SearchIcon"
215
+ <Path Name =" SearchIcon"
222
216
Margin =" 0"
223
217
Data =" {DynamicResource SearchIconImg}"
224
218
Stretch =" Fill"
231
225
<ContentControl >
232
226
<ContentControl .Style>
233
227
<Style TargetType =" ContentControl" >
234
- <Setter Property =" Visibility" Value =" Collapsed" />
228
+ <Setter Property =" Visibility"
229
+ Value =" Collapsed" />
235
230
<Style .Triggers>
236
- <DataTrigger Binding =" {Binding ElementName=ResultListBox, Path=Visibility}" Value =" Visible" >
237
- <Setter Property =" Visibility" Value =" Visible" />
231
+ <DataTrigger Binding =" {Binding ElementName=ResultListBox, Path=Visibility}"
232
+ Value =" Visible" >
233
+ <Setter Property =" Visibility"
234
+ Value =" Visible" />
238
235
</DataTrigger >
239
- <DataTrigger Binding =" {Binding ElementName=ContextMenu, Path=Visibility}" Value =" Visible" >
240
- <Setter Property =" Visibility" Value =" Visible" />
236
+ <DataTrigger Binding =" {Binding ElementName=ContextMenu, Path=Visibility}"
237
+ Value =" Visible" >
238
+ <Setter Property =" Visibility"
239
+ Value =" Visible" />
241
240
</DataTrigger >
242
- <DataTrigger Binding =" {Binding ElementName=History, Path=Visibility}" Value =" Visible" >
243
- <Setter Property =" Visibility" Value =" Visible" />
241
+ <DataTrigger Binding =" {Binding ElementName=History, Path=Visibility}"
242
+ Value =" Visible" >
243
+ <Setter Property =" Visibility"
244
+ Value =" Visible" />
244
245
</DataTrigger >
245
246
</Style .Triggers>
246
247
</Style >
247
248
</ContentControl .Style>
248
- <Rectangle
249
- Width =" Auto"
249
+ <Rectangle Width =" Auto"
250
250
HorizontalAlignment =" Stretch"
251
251
Style =" {DynamicResource SeparatorStyle}" />
252
252
</ContentControl >
253
- <Line
254
- x : Name =" ProgressBar"
253
+ <Line x : Name =" ProgressBar"
255
254
Width =" {Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
256
255
Height =" 2"
257
256
HorizontalAlignment =" Right"
267
266
<Border Style =" {DynamicResource WindowRadius}" >
268
267
<Border .Clip>
269
268
<MultiBinding Converter =" {StaticResource BorderClipConverter}" >
270
- <Binding Path =" ActualWidth" RelativeSource =" {RelativeSource Self}" />
271
- <Binding Path =" ActualHeight" RelativeSource =" {RelativeSource Self}" />
272
- <Binding Path =" CornerRadius" RelativeSource =" {RelativeSource Self}" />
269
+ <Binding Path =" ActualWidth"
270
+ RelativeSource =" {RelativeSource Self}" />
271
+ <Binding Path =" ActualHeight"
272
+ RelativeSource =" {RelativeSource Self}" />
273
+ <Binding Path =" CornerRadius"
274
+ RelativeSource =" {RelativeSource Self}" />
273
275
</MultiBinding >
274
276
</Border .Clip>
275
277
<ContentControl >
276
- <flowlauncher : ResultListBox
277
- x : Name =" ResultListBox"
278
+ <flowlauncher : ResultListBox x : Name =" ResultListBox"
278
279
DataContext =" {Binding Results}"
279
280
PreviewMouseDown =" OnPreviewMouseButtonDown" />
280
281
</ContentControl >
281
282
</Border >
282
283
<Border Style =" {DynamicResource WindowRadius}" >
283
284
<Border .Clip>
284
285
<MultiBinding Converter =" {StaticResource BorderClipConverter}" >
285
- <Binding Path =" ActualWidth" RelativeSource =" {RelativeSource Self}" />
286
- <Binding Path =" ActualHeight" RelativeSource =" {RelativeSource Self}" />
287
- <Binding Path =" CornerRadius" RelativeSource =" {RelativeSource Self}" />
286
+ <Binding Path =" ActualWidth"
287
+ RelativeSource =" {RelativeSource Self}" />
288
+ <Binding Path =" ActualHeight"
289
+ RelativeSource =" {RelativeSource Self}" />
290
+ <Binding Path =" CornerRadius"
291
+ RelativeSource =" {RelativeSource Self}" />
288
292
</MultiBinding >
289
293
</Border .Clip>
290
294
<ContentControl >
291
- <flowlauncher : ResultListBox
292
- x : Name =" ContextMenu"
295
+ <flowlauncher : ResultListBox x : Name =" ContextMenu"
293
296
DataContext =" {Binding ContextMenu}"
294
297
PreviewMouseDown =" OnPreviewMouseButtonDown" />
295
298
</ContentControl >
296
299
</Border >
297
300
<Border Style =" {DynamicResource WindowRadius}" >
298
301
<Border .Clip>
299
302
<MultiBinding Converter =" {StaticResource BorderClipConverter}" >
300
- <Binding Path =" ActualWidth" RelativeSource =" {RelativeSource Self}" />
301
- <Binding Path =" ActualHeight" RelativeSource =" {RelativeSource Self}" />
302
- <Binding Path =" CornerRadius" RelativeSource =" {RelativeSource Self}" />
303
+ <Binding Path =" ActualWidth"
304
+ RelativeSource =" {RelativeSource Self}" />
305
+ <Binding Path =" ActualHeight"
306
+ RelativeSource =" {RelativeSource Self}" />
307
+ <Binding Path =" CornerRadius"
308
+ RelativeSource =" {RelativeSource Self}" />
303
309
</MultiBinding >
304
310
</Border .Clip>
305
311
<ContentControl >
306
- <flowlauncher : ResultListBox
307
- x : Name =" History"
312
+ <flowlauncher : ResultListBox x : Name =" History"
308
313
DataContext =" {Binding History}"
309
314
PreviewMouseDown =" OnPreviewMouseButtonDown" />
310
315
</ContentControl >
311
316
</Border >
312
317
</StackPanel >
313
318
</Border >
314
319
</Grid >
315
- </Window >
320
+ </Window >
0 commit comments