I've seen a few implementations of tray-located apps now. Despite the urge to develop my own stuff, I think I'd like to give this one a go : http://www.codeproject.com/KB/WPF/wpf_notifyicon.aspx
Anyway, I really wonder whether it is possible to get and control windowstates from an XBAP application. I think it might not be, since they run boxed in the PresentationHost, but I'm not really sure about that.
What I'd like to do: When the browser is closed / minimized, show a tray Icon. Usual tray behavior, but applied to XBAP.
Please also note that the XBAP is running elevated to Full Trust (it's an app for internal usage only), maybe that changes a few things.
开发者_StackOverflow社区Has anybody tried this before?
Cheers,
Sebi
If your XBAP is running with full-trust, then you can certainly add an item to the notification area. If the browser is closed, then it appears that the notification icon is removed though.
You may need to create a hidden Window to receive messages, but otherwise you would simply use the same technique as with a regular WPF application.
But, it sounds like you may be better off using a Clickonce application.
精彩评论