System Tray Popup Windows 7 Style

Posted by Mason Blier on Stack Overflow See other posts from Stack Overflow or by Mason Blier
Published on 2010-06-01T15:39:56Z Indexed on 2010/06/01 15:43 UTC
Read the original article Hit count: 632

Filed under:
|
|

Hey All,

I want something like this:

http://cybernetnews.com/wp-content/uploads/2008/10/windows-7-wireless.jpg

This window is not resizable, and aligns itself above the system tray icon which it is related to.

I have this: http://i.imgur.com/79FZi.png

Which is resizeable, and it goes wherever it feels like. If you click the volume control in Win 7, it always pops up directly above the icon. This is ideal.

I've found this reference which I think is trying to solve the same problem (can't tell though as the images are dead), http://stackoverflow.com/questions/2169006/create-a-system-tray-styled-box-in-winforms-c

but I'm using WPF and I'm not sure how to get these Form objects they refer to from my Window object. This is the XAML declaration of my window atm,

<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="WirelessControl.Window1"
x:Name="Window"
Title="Window1"
Width="260" Height="370" mc:Ignorable="d" WindowStyle="None"></Window>

I feel like based on how common this is in Windows that there must be a fairly easy way to do this.

ResizeMode="NoResize" causes my window border to disappear, so that's no help.

Thanks guys, I hope I was comprehensive enough.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about windows-7