Is there a WPF control or technique to emulate Outlook's new mail alert in the bottom right of the taskbar tray?
This would probably be a good solution.
Related
I am working in a WPF app in C# and it is really very very sad that WPF doesn't have a NotifyIcon like in the Win forms has. I have seen a lot of articles in the net for a wpf notifyicon balloon notification project. But none satisfied me. See, I have an idea but i don't know how to execute it.
Create a wpf user control with height and width same like the notifyicon.
Put a border control in it with corner radius 5. Put a grid inside that border control to place the textblocks and images.
Then position that user control to the system tray area. When we click a button from a window, this user control shows up just above the system tray and it hides when we click on outside area.
Is this possible to place the user control [this new "notifyicon" ] just above the system tray area ???
You can do this using an AdornerDecorater in you XAML.
Check this project out GitHub. It has a configurable notification toast popup control for WPF with a demo app.
Taking it a bit further than hosting WinForms user controls in my WPF application, I am actually hosting Delphi forms, i.e. top level windows. I am doing so through the voodoo in blog post How To Host Top-Level HWNDs In WPF.
Nearly everything works perfectly. I send a COM server, built in Delphi, a menu path string, and it sends back a window handle, which I pass to the host control described in the blog. The Delphi window receives nearly all events (rather, Windows Messages) correctly, without any intervention on my part.
The only problem is the buttons. They receive a click event/message fine, and work, but now the Delphi guys have added new icons to the buttons, and each button has an active icon, a hover icon, and a click icon. They receive none of the messages they should to change these icons. Why do nearly all messages work except these? What can I read and or do to try and correct this?
In MouseOver event, send some user message and catch it.
WPF and Win32 Interoperation
HWNDs inside WPF > Notable Differences in Input behavior
While the mouse is over the HwndHost, your application does not receive WPF mouse events, and the value of the WPF property IsMouseOver will be false.
I added a tray icon to my app, but most of the time in order to see it in Windows 8.1,
I have to click on an up arrow in the tray icon area that brings up a subwindow
that has numerous other tray icons.
How can I get my tray icon to always appear in the tray icon area?
This is not possible to achieve programmatically, this is an OS user preference that is controlled by the end user.
The best you can do is alert user with an explanation on how to customize the tray to always show your tray icon.
EDIT:
Apparently it might be possible to actually do this by modifying the registry... check out this blog post: New Windows Tray / Notification Manager is here!
I'm working on an ActiveX control which is hosted in MFC and VB6 applications.
This ActiveX contains a WPF control, itself hosted by a WinForms ElementHost, i.e.:
MFC > .NET ActiveX > WinForms ElementHost > WPF UserControl
When an user right-clicks on the control, he must be able to navigate in the contextual menu using the keyboard arrow keys.
If my control has the focus when the right-click occurs, everything works fine.
But if the focus is in the host application when the user right-clicks, keyboard events continue to be sent to the host MFC application.
I tried to call the Focus() method on my WPF control when I detect the right click, but it doesn't work.
Does anybody have an idea ?
Thanks.
I have found a workaround.
When the PreviewMouseRightButtonDown event occurs on the WPF form, I call the Focus method on the WinForm host control.
I don't really understand why, but this lets users use their keyboards to navigate in the contextual menu.
In my WPF application, when there is no user activity for 2 minutes, the application logs off.
I need to show the login box in the silverlight style (Background fades off). How can this be accomplished in WPF?
Yes you are right using adorner you can do this.
there are many articles there.. try these
http://techiethings.blogspot.com/2009/12/web-style-wpf-popup.html
http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/
Regards.