vis issue on start, fixing border

This commit is contained in:
Clint Rutkas 2020-05-12 08:52:03 -07:00
parent 273902a6c2
commit b5daffca55
5 changed files with 5 additions and 44 deletions

View File

@ -5,8 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
ActualThemeChanged="UserControl_ActualThemeChanged"
Loaded="UserControl_Loaded"
d:DesignHeight="300"
d:DesignWidth="720">
<UserControl.Resources>

View File

@ -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));
}
}

View File

@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:ToolkitBehaviors="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors"
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"

View File

@ -94,7 +94,7 @@ namespace PowerLauncher
_settingsWatcher = new SettingsWatcher(_settings);
_mainVM.MainWindowVisibility = Visibility.Visible;
_mainVM.MainWindowVisibility = Visibility.Hidden;
Log.Info("|App.OnStartup|End Wox startup ---------------------------------------------------- ");
bootTime.Stop();

View File

@ -282,7 +282,9 @@ namespace PowerLauncher
this.SearchBoxBorder.BorderBrush = solidBorderBrush;
this.SearchBoxBorder.Background = solidBorderBrush;
this.ListBoxBorder.BorderBrush = solidBorderBrush;
this.ListBoxBorder.Background = solidBorderBrush;
}
}
else if(e.PropertyName == "PrimaryTextColor")