mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #1380 from Sparrkle/QueryTextboxNotify
Fixed QueryTextbox Binding event
This commit is contained in:
commit
1546f63897
2 changed files with 14 additions and 2 deletions
|
|
@ -174,6 +174,7 @@
|
|||
PreviewDragOver="OnPreviewDragOver"
|
||||
Style="{DynamicResource QueryBoxStyle}"
|
||||
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
PreviewKeyUp="QueryTextBox_KeyUp"
|
||||
Visibility="Visible">
|
||||
<TextBox.CommandBindings>
|
||||
<CommandBinding Command="ApplicationCommands.Copy" Executed="OnCopy" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
|
@ -20,6 +20,8 @@ using Flow.Launcher.Infrastructure;
|
|||
using System.Windows.Media;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using System.Windows.Data;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
|
|
@ -555,5 +557,14 @@ namespace Flow.Launcher
|
|||
ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Dark;
|
||||
}
|
||||
}
|
||||
|
||||
private void QueryTextBox_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(_viewModel.QueryText != QueryTextBox.Text)
|
||||
{
|
||||
BindingExpression be = QueryTextBox.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty);
|
||||
be.UpdateSource();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue