I have an app that currently shows a message box when the users saves that just says "Saved successfully". The problem is, user's tend to save frequently when using this app and the message box is a pain in the #$$. I'd like to have a little notification box that fades in and out and doesn't require user interaction, kind of like how Growl notifications work on a Mac.
Is there any .net library or free 3rd party application that does something like this?
There is no need to use 3rd party libraries for something like this.
Crate a form for your notifications, styled as you wish.
When you need to notify, you can Show the form - to fade it in and out use the Opacity property (using a timer to animate the changes).
Have a look at this and see if it does what you want.
Office 2003-like popup
Related
I am currently working on a Windows Presentation Foundation app and I need to make use of Message boxes. I want to get few information from user inside Message Box popup.
But they appear always like this:
But I think the actual look of it should be like that:
Does anybody know, why this is, and how to solve it? I tried all everything listed
here
, but nothing worked.
I agree with Keithernet, build your own. Its more of an Input Dialog box. You may want to plan it to create a window, create it with ex: 4 parameters which you could override so you can apply them in the form including
The title,
The prompt you want the user to fill in
optional default button 1 text
optional default button 2 text.
have the input value stored into a public property in the window for the text to be bound to during entry.
If the user clicks the cancel button (or similar), clear the text entry and close the window. If ok button, just close the window.
Then, when you call it with a YourWindow.ShowDialog(), upon return, you can look at the public property for that input text value.
You could even do with a property / flag if the user cancelled directly or not. I have done similar in a couple of my WPF apps.
MessageBox is very limited. Based on your screenshot, you should just create your own child Window with your own XAML so you can get the user input.
You can find sample service implementations/NuGets for this on GitHub. Here is one I've created sometime ago: https://github.com/Dirkster99/MsgBox
Just create your own is an oversimplifying statement in my opinion because this is usually a dialog that you want to show in different parts of the application. Therefore, you have to settle for a software design pattern (I chose a service implementation as suggested here).
Likewise, there are other design decisions that should be taken. I have for instance made sure that the API has a compatible subset of Show API calls with the standard .Net MessageBox to make its application as flexible as possible. I also settled for light and dark themes hoping this will make its application easy in any other theme...
I am creating my personal gmail checker in C# and I need a way to popup a notification in system tray whenever there is a new email and how to control the contents of that notification bar. Also if possible I don't need it to be like windows notifications but my personal way. For example not popup like a notification but like a rectangle (or square or whatever) and if windows taskbar is in autohide the taskbar not be shown but only the notification. Also it is a wpf app. If you need more info let me know
Sounds like you're looking at trying to create a "toaster"-style popup. You can take a look at including something like this WPF NotifyIcon:
This is an implementation of a NotifyIcon (aka system tray icon or taskbar icon) for the WPF platform. It does not just rely on the Windows Forms NotifyIcon component, but is a purely independent control which leverages several features of the WPF framework in order to display rich ToolTips, Popups, context menus, and balloon messages. It can be used directly in code or embedded in any XAML file.
You could also look at using a notification framework like Growl for Windows:
Ok, so what is Growl?
Put simply, Growl lets you know when things happen. Files finished downloading, friends came online, new email has arrived - Growl can let you know when any event occurs with a subtle notification. The rest of the time, Growl stays out of your way.
Along with letting you know when things happen, Growl also gives you full control over how you are notified and what action (if any) you want to take in response to the notification. You can choose to be alerted with a visual indicator or an audible alert, both, or neither. You can choose the type of display that is shown, whether the display remains on the screen, the importance of the notification, and even if the notification should be forwarded to another computer. You can have notifications that trigger an email, run a script, launch a program, or are read out loud.
You can find the documentation and Growl.net files on Growl's developer page.
Does anyone know a good, well tested, widely used open source Android-like toast control form WinForms?
Like this:
http://www.youtube.com/watch?v=Ut6QvIOXv2I&feature=player_embedded
I know it could be solved by tricking pop up forms with timers etc, but I don't wanna reinvent the wheel, so, if there is a nice solution, I'd use that.
Thanks!
I suggest Form Fade In/Out Effect and Notification Window and NotifyWindow: A different MSN Messenger style notification window
I have a list of items in a listview and when the user double-clicks an item, I display a messagebox with the contact's name and address.
My boss doesn;t like it because he thinks this violate some UI design principle for Windows Mobile devices. I can't find anything that prohibits this. He is thinking that it has something to do with the device not being able to go into power-saving mode when a message-box is displayed.
Is he right? Can you suggest an alternative (he doesn;t have an alternative except he doesn;t like what i have)
C#, Windows Mobile 6.0, WinForms
Windows Mobile 6 uses MessageBox all the time. It is probably better than rolling your own solution because you'll automatically benefit from updates in WM6.5 which a custom solution wouldn't.
The device has no problem going into power-saving mode while a message box is displayed. Other options available to you include using a tabbed view and switching to another tab to display details, or creating and displaying a new form to display details.
Surfing the net, I came across this:
this code that shows how to display a notification at the bottom of the screen on a Windows Mobile device. My question is, is there a way to either specify which options are displayed beneath the notification (on the taskbar) or is there a way to detect when the user clicks on the notification itself, so that I can react to that programmatic ally.
With this specific API, the key is in the SHNOTIFICATIONDATA's hwndSink member. When the notification is clicked, the hwnd you pass in here will get the click message. For this it's simplest to pass in a MessageWindow's handle.
You might also look at the CeSetUserNotification API instead. It's actually quite a bit more robust in what it allows you to do and how you can get notifications back at the app.