You can use System.Windows.Forms to use NotifyIcon and System.Drawing to use Icon to implement the hidden of minimized window under the taskbar on the right. It looks like below picture shown:
To implement it, you need to add the below code to your cs code:
public partial class MainWindow : Window
{
NotifyIcon notifyIcon;
public MainWindow()
{
InitializeComponent();
}
private void Window_StateChanged(object sender, EventArgs e)
{
switch (this.WindowState)
{
case WindowState.Maximized:
break;
case WindowState.Minimized:
this.notifyIcon = new NotifyIcon();
notifyIcon.BalloonTipText = "This is WPF app";
notifyIcon.Icon = new System.Drawing.Icon("Todolist.ico");
notifyIcon.Visible = true;
notifyIcon.MouseDoubleClick += OnNotifyIconDoubleClick;
this.notifyIcon.ShowBalloonTip(1000);
this.Hide();
break;
case WindowState.Normal:
break;
}
}
private void OnNotifyIconDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.Show();
WindowState = WindowState.Normal;
}