Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6563381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:49:30+00:00 2026-05-25T13:49:30+00:00

NotificationWindow notify = new NotificationWindow(); NotifyWindow win = new NotifyWindow(); win.Header.Text = Custom Message

  • 0
            NotificationWindow notify = new NotificationWindow();
            NotifyWindow win = new NotifyWindow();
            win.Header.Text = "Custom Message Header";
            win.Description.Text = "This is a custom description.";
            notify.Width = win.Width;
            notify.Height = win.Height;
            notify.Content = win;
            notify.Show(5000); 

When this program have been execute 3 times,[NotificationWindow only one is visible at a time]Error is appear by notify.Show(5000).how do I solve this problem??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:49:31+00:00Added an answer on May 25, 2026 at 1:49 pm

    You need to maintain a queue of notifications so that each notification appears after another. To do that you’ll need manage such a queue with your own code.

    Here is such a notification queue manager I’ve knocked up.

    public static class NotificationManager
    {
        private static Queue<FrameworkElement> queue = new Queue<FrameworkElement>();
        private static NotificationWindow window = new NotificationWindow();
        private static int duration = 5000;
    
        static NotificationManager()
        {
            window.Closed += window_Closed;
        }
    
        public static void Notify(FrameworkElement content)
        {
            if (Deployment.Current.Dispatcher.CheckAccess())
            {
                if (window.Visibility == Visibility.Collapsed && queue.Count == 0)
                {
                    Show(content);
                }
                else
                {
                    queue.Enqueue(content);
                }
            }
            else
            {
                Deployment.Current.Dispatcher.BeginInvoke(() => Notify(content));
            }
        }
    
        public static void CloseCurrentNotification()
        {
            window.Close();
        }
    
        private static void window_Closed(object sender, EventArgs e)
        {
            if (queue.Count > 0)
            {
                Show(queue.Dequeue());
            }
        }
    
        private static void Show(FrameworkElement content)
        {
            window.Content = content;
            window.Height = content.Height;
            window.Width = content.Width;
            window.Show(duration);
        }
    }
    

    You can adjust your code to:-

                NotifyWindow win = new NotifyWindow();
                win.Header.Text = "Custom Message Header";
                win.Description.Text = "This is a custom description.";
                NotificationManager.Notify(win);
    

    If you call such code repeatedly you will just get multiple notifications (although it might be hard to tell if the text doesn’t change).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know if there is a siverlight client notification best practice, right
Silverlight out of browser application has capabilities of Notification window. Is there a way
Is it possible to create GUI firewall that works as Windows and Mac counterparts?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.