Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
332
MultipleWindowDisplayStyle.Tiled
posted
Hi, I encountered a problem the other day and I'm trying to figure out if there is a fix / work-around / or something I can do to prevent it. Essentially, my ultraDesktopAlert is set to show multiple window displayed in tiled mode, and autoclose false. It seems even after the entire screen is filled with alerts, they continue to queue somewhere in the ultraDesktopAlert until the queue overflows. I was wondering if there is anywhere I can check periodically to see the count of this queue, or even to catch this overflow exception when it occurs so as to prevent my client (application) from seeing that silly error message. Thanks
  • 69832
    Verified Answer
    Offline posted

    The component was not designed with the intention of filling up the entire screen with alerts. There is no method that returns the number of currently open alerts, but the Show method returns an UltraDesktopAlertWindowInfo instance that provides information about the window that was shown, and you can pass such an instance to the component's IsOpen method to determine whether it is still open. If you add each of these instances to a list when you call the show method, iterate that list and call the IsOpen method on each member, you can get a count on the current open alerts. Also, since the UltraDesktopAlertWindowInfo class exposes a Bounds property, from which you can get the alert's screen location and size, you should also be able to determine when the screen is filled up by using the union of those rectangles.

    The fact that the component allows this to happen could be considered a bug, so you might want to log an incident. The solution would probably be a property that dictates the maximum number of the alerts that can be open, with an exception being thrown when that number is exceeded.