I have an Imaging Application that can download Images in a background thread. I am using a Desktop Alert to notify the user that the download is complete.
I would like to use the desktop alert to show a progress bar as the pages are being downloaded. Is this possible? If so how could I add a progress bar to the Desktop Alert?
Hello Tom,
A possible approach to achieve this might be by using a 'CreationFilter'.
You could read about it at the following link: http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Win_Creation_Filter.html. Here are some topics from our community which could also help you: http://community.infragistics.com/forums/t/34485.aspx, http://forums.infragistics.com/forums/t/47561.aspx http://community.infragistics.com/forums/t/58186.aspx, http://community.infragistics.com/forums/t/9989.aspx and http://community.infragistics.com/forums/t/50234.aspx.
The above approach is not so recommended, because it features element resizing, creating or removing and could lead to some unexpected behaviors.
I have attached a small sample project to demonstrate this approach.
Please do not hesitate to ask if something comes up.
Sorry, I'm not quite getting it
I tried adding the following to your project.
I could not get the Desktop alert to show immediately and stay visible while indicating the progress as the progress bar value was changed.
private void Form1_Load(object sender, EventArgs e) {
ThisInfo = new UltraDesktopAlertShowWindowInfo("Caption", "Text");
ultraDesktopAlert1.CreationFilter = new CF(ultraProgressBar1);
this.ultraProgressBar1.Visible=true; this.ultraProgressBar1.Maximum = 5;
}
private void btnShowDTA_Click(object sender, EventArgs e) {
ultraDesktopAlert1.Visible = true;
for (int i = 0; i < 5; i++) {
this.ultraProgressBar1.Value += 1;
ultraDesktopAlert1.Show(ThisInfo);
Application.DoEvents();
System.Threading.Thread.Sleep(1000);
Adding the following properties makes it display and increment the progress bar:
ultraDesktopAlert1.MultipleWindowDisplayStyle = MultipleWindowDisplayStyle.None;
ultraDesktopAlert1.Style = DesktopAlertStyle.Office2007;
ultraDesktopAlert1.AnimationStyleShow = AnimationStyle.None;
However, it flashes each time the ultraDesktopAlert1.Show(ThisInfo); executes in the loop. If I move the Show out of Loop the Progress bar does not change at all.
How can I update the Text, caption or Progress bar without doing a Show Method again? I didn't see an Invalidate, or update method ...
This is the issue with the above approach here.
So after some research, the "Embedding controls in DesktopAlert" has been determined to be a new product idea. I have sent your idea directly to our product management team.
Our product team chooses new ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time.
Your reference number for this product idea is PI13060019.
If you would like to follow up on your request at a later point, you may contact Developer Support management via email. Please include the reference number of your product idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.