I am exploring ways to alert user without using dialog boxes. Desktop Alert kind of alerting is perfect because it can made to show in the corner and disappears on its own without user interaction. Ideally I would like the alert to show within the user control instead of outside. The implementation I have seen it show outside the application I am running.
Thanks!
Hello ,
You could display desktop alert window where you want, please see the following tutorial
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/WinDesktopAlert_Display_a_Desktop_Alert_Window_Anywhere_on_the_Screen.html
Please let me know if this is what you are looking for.
Hello Hristo,
In the Desktop Alert can one have messages with links in it? For example, the alert message may say something like:
Processing errors. Click here for details
When the user presses the link, some handler code would be invoked.
Hello,
Yes you could have two links in your alert window, but before do that please consider the approach to have a buttons for your options. On the following link you will find a tutorial of how to use alert buttons:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/WinDesktopAlert_Adding_Alert_Buttons_to_the_Desktop_Alert_Reminder.html
I hope that this will helps you.
Thanks Hristo. This is good info. I was unaware of buttons on the alert box and it definitely increases the choices to consider. I will see how the requirements play out with regard to button versus links using text.
In case I am required to implement as links using text, I am guessing it would tricky because (if I am not mistaken) there is only one link handler available. How would I do it for two or more links?
It seems that you haven’t tested my sample code, because it display “Link to Infragistics.” in Text area, so in the text area you could have a text with several links in it, not only one.
Please let me know if you have any further questions or for some reason you are not able to implement code snipped .
Actually I posted my question after implementing your solution. I noticed there was only handler.
I am guessing the key is using to using LinkClickedArgs? I read this one . My question is how does the handler know which of the two link (two href's ) was clicked?
From the argument you could get LinkClikedArgs and to check LinkRef property, which will returns you the bold part of the formatted text:
"Link to <a href=\"http://es.infragistics.com\"> Infragistics</a>.";
MessageBox.Show(e.LinkClickedArgs.LinkRef);
Also if it is needed you could cancel opening of the link and to perform your custom action:
e.LinkClickedArgs.OpenLink = false;
Please let me know if you have any further questions.