Update 3rd :
Recently I tried to build the App, shared in this repo https://github.com/ejabu/TrayApp
things to note :
- WindowStyle
to get Borderless window like People App.
<!-- MainWindow.xaml -->
<Window
....
WindowStyle="None">
<Grid/>
</Window>
- ShowInTaskbar
ShowInTaskbar -> False
to prevent it appears on Taskbar
<!-- MainWindow.xaml -->
<Window
....
ShowInTaskbar="False"
...>
<Grid/>
</Window>
- Use Hide Method
/// MainWindow.xaml.cs
private void Hide_Window()
{
this.Hide(); /// Minimize Window
}
- Adjust Position according to Taskbar
/// MainWindow.xaml.cs
private void AdjustWindowPosition()
{
Screen sc = Screen.FromHandle(new WindowInteropHelper(this).Handle);
if (sc.WorkingArea.Top > 0)
{
Rect desktopWorkingArea = SystemParameters.WorkArea;
Left = desktopWorkingArea.Right - Width;
Top = desktopWorkingArea.Top;
}
else if ((sc.Bounds.Height - sc.WorkingArea.Height) > 0)
{
Rect desktopWorkingArea = SystemParameters.WorkArea;
Left = desktopWorkingArea.Right - Width;
Top = desktopWorkingArea.Bottom - Height;
}
else
{
Rect desktopWorkingArea = SystemParameters.WorkArea;
Left = desktopWorkingArea.Right - Width;
Top = desktopWorkingArea.Bottom - Height;
}
}
Update 2nd :
https://github.com/AronDavis/TwitchBot/blob/master/TwitchBotApp/Notification.xaml
Update:
https://www.youtube.com/watch?v=jdvD55ir1is
original :
this is the good example
Final Result
the Window page has no Close button. And also it cannot be dragged by commenting this line https://github.com/ejabu/AcrylicWindow/blob/343f4f5a6bc23109a97640f9ac35facb31e9ae43/AcrylicWindow/MainWindow.xaml.cs#L30
I found example project here
https://github.com/shenchauhan/MyPeople/tree/master/MyPeople/MyPeople
We may look at MyPeopleCanvas
then.
I found also there is new update from Microsoft, that maybe we can replace Icon images with text in System Tray icon in the near future.
https://newswwc.com/technology/dotnet-technologies/personalized-content-at-a-glance-introducing-news-and-interests-on-the-windows-10-taskbar/