diff --git a/Wox.Infrastructure/UserSettings/Settings.cs b/Wox.Infrastructure/UserSettings/Settings.cs
index 7a040cd5ee..8e72a24875 100644
--- a/Wox.Infrastructure/UserSettings/Settings.cs
+++ b/Wox.Infrastructure/UserSettings/Settings.cs
@@ -44,6 +44,16 @@ namespace Wox.Infrastructure.UserSettings
public bool StartWoxOnSystemStartup { get; set; } = true;
public bool HideOnStartup { get; set; }
+ bool _hideNotifyIcon { get; set; }
+ public bool HideNotifyIcon
+ {
+ get { return _hideNotifyIcon; }
+ set
+ {
+ _hideNotifyIcon = value;
+ OnPropertyChanged();
+ }
+ }
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactive { get; set; }
public bool RememberLastLaunchLocation { get; set; }
diff --git a/Wox/Languages/en.xaml b/Wox/Languages/en.xaml
index ddc40b2d4f..7431d1da55 100644
--- a/Wox/Languages/en.xaml
+++ b/Wox/Languages/en.xaml
@@ -32,6 +32,7 @@
Auto Update
Select
Hide Wox on startup
+ Hide tray icon
Plugin
diff --git a/Wox/Languages/zh-cn.xaml b/Wox/Languages/zh-cn.xaml
index d471a41113..9b3bff0c7c 100644
--- a/Wox/Languages/zh-cn.xaml
+++ b/Wox/Languages/zh-cn.xaml
@@ -32,6 +32,7 @@
自动更新
Select
启动时不显示主窗口
+ 隐藏任务栏图标
插件
diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs
index 2b84bb890f..427f641a4e 100644
--- a/Wox/MainWindow.xaml.cs
+++ b/Wox/MainWindow.xaml.cs
@@ -85,6 +85,13 @@ namespace Wox
}
}
};
+ _settings.PropertyChanged += (o, e) =>
+ {
+ if (e.PropertyName == nameof(Settings.HideNotifyIcon))
+ {
+ _notifyIcon.Visible = !_settings.HideNotifyIcon;
+ }
+ };
InitializePosition();
}
@@ -102,7 +109,7 @@ namespace Wox
{
Text = Infrastructure.Constant.Wox,
Icon = Properties.Resources.app,
- Visible = true
+ Visible = !_settings.HideNotifyIcon
};
var menu = new ContextMenuStrip();
var items = menu.Items;
diff --git a/Wox/SettingWindow.xaml b/Wox/SettingWindow.xaml
index 35b02cebda..bf25e3e600 100644
--- a/Wox/SettingWindow.xaml
+++ b/Wox/SettingWindow.xaml
@@ -42,6 +42,9 @@
+
+
+