File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 174
174
PreviewDragOver =" OnPreviewDragOver"
175
175
Style =" {DynamicResource QueryBoxStyle}"
176
176
Text =" {Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
177
+ PreviewKeyUp =" QueryTextBox_KeyUp"
177
178
Visibility =" Visible" >
178
179
<TextBox .CommandBindings>
179
180
<CommandBinding Command =" ApplicationCommands.Copy" Executed =" OnCopy" />
Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . ComponentModel ;
3
3
using System . Threading . Tasks ;
4
4
using System . Windows ;
20
20
using System . Windows . Media ;
21
21
using Flow . Launcher . Infrastructure . Hotkey ;
22
22
using Flow . Launcher . Plugin . SharedCommands ;
23
+ using System . Windows . Data ;
24
+ using System . Diagnostics ;
23
25
24
26
namespace Flow . Launcher
25
27
{
@@ -555,5 +557,14 @@ public void InitializeColorScheme()
555
557
ModernWpf . ThemeManager . Current . ApplicationTheme = ModernWpf . ApplicationTheme . Dark ;
556
558
}
557
559
}
560
+
561
+ private void QueryTextBox_KeyUp ( object sender , KeyEventArgs e )
562
+ {
563
+ if ( _viewModel . QueryText != QueryTextBox . Text )
564
+ {
565
+ BindingExpression be = QueryTextBox . GetBindingExpression ( System . Windows . Controls . TextBox . TextProperty ) ;
566
+ be . UpdateSource ( ) ;
567
+ }
568
+ }
558
569
}
559
- }
570
+ }
You can’t perform that action at this time.
0 commit comments