开发者

Showing multiple windows - activation problem

开发者 https://www.devze.com 2023-04-04 17:57 出处:网络
I\'m writing small notification component, however I have a problem with showing multiple notification at once.

I'm writing small notification component, however I have a problem with showing multiple notification at once. My alert/notification window inherits from window class. The contstructor of Alert looks like that

 public Alert()
        {

            InitializeComponent();

            Focusable = true;
            ShowActivated = false;
            ShowInTaskbar = false;
            //Topmost = true;
            AllowsTransparency = true;
            Opacity = 1;
            // Set up the fade in and fade out animations
            _Hint = "hint";
            Loaded += new RoutedEventHandler(DesktopAlert开发者_JAVA技巧Base_Loaded);

        }

In main window of application I have a list of alerts, thanks to this I know where to place alerts on the screen. If I want to show an alert I create an instance of Alert class and then I use Show() method. Alerts are shown and everything is OK except the fact that I can use/move/interact with only last alert window (last created window).The rest of alert windows can't be clicked. However if I close last window I can use one before last and so on... Is it possible to make multiple windows clicable/active ?


Can you please, provide code, where you use show method? It looks like you are using ShowDialog() method instead of Show().
Another possibility is some locks in your DesktopAlertBase_Loaded() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消