-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Search box to WPF control (#2917)
* Replaced UWP searchbox with WPF * Updated foreground color scheme for textbox * Add focus on visibility changed * Updated initial hiding of window * Fixed list box border * vis issue on start, fixing border * Revert "Merge branch 'somil55/MigrateSearchBoxToWPF' into fewTweaks" This reverts commit 3525171, reversing changes made to b5daffc. * Remove change in startup visibility Co-authored-by: Clint Rutkas <clint@rutkas.com>
- Loading branch information
1 parent
245b52d
commit a1e1d66
Showing
10 changed files
with
458 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 1 addition & 39 deletions
40
src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,12 @@ | ||
using System.ComponentModel; | ||
using System.Diagnostics; | ||
using System.Runtime.CompilerServices; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Media; | ||
|
||
namespace PowerLauncher.UI | ||
{ | ||
public sealed partial class LauncherControl : UserControl, INotifyPropertyChanged | ||
public sealed partial class LauncherControl : UserControl | ||
{ | ||
private Brush _borderBrush; | ||
|
||
public LauncherControl() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
public Brush SolidBorderBrush | ||
{ | ||
get { return _borderBrush; } | ||
set { Set(ref _borderBrush, value); } | ||
} | ||
|
||
private void Set<T>(ref T storage, T value, [CallerMemberName]string propertyName = null) | ||
{ | ||
if (Equals(storage, value)) | ||
{ | ||
return; | ||
} | ||
|
||
storage = value; | ||
OnPropertyChanged(propertyName); | ||
} | ||
|
||
private void UserControl_ActualThemeChanged(FrameworkElement sender, object args) | ||
{ | ||
SolidBorderBrush = Application.Current.Resources["SystemChromeLow"] as SolidColorBrush; | ||
} | ||
|
||
private void UserControl_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
SolidBorderBrush = Application.Current.Resources["SystemChromeLow"] as SolidColorBrush; | ||
} | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
private void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.