This is a migrated thread and some comments may be shown as answers.

Loaded/Unloaded events

7 Answers 121 Views
Window
This is a migrated thread and some comments may be shown as answers.
Trude
Top achievements
Rank 2
Trude asked on 06 Oct 2011, 09:53 AM
If I open three windows (W1, W2 and W3) - the loaded event is called once per window.
W3 is now active
If I click W2 the loaded AND unloaded event is fired for BOTH windows? Why?
If I click W1 the loaded AND unloaded event is fired for ALL THREE windows? Why?
Logically this does not make sense. The loaded event should fire for the active/foremost window and the unloaded event should fire for the previous window.

I can manage these events on the window and the main usercontrol (content) by having a flag that tells if the window is open or closed, but if there are controls/usercontrols in the content that subscribe to their own loaded/unloaded events there is trouble since they fire 5-6 times every time I switch between windows (they don't know if they should ignore these events or initialize/clean-up).

7 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 07 Oct 2011, 11:55 AM
Hello Jorn,

Thank you for contacting us. We were able to fix the problem and the fix will available in the next internal build. Though the loaded event will still be fired of the window that is brought to the front as this is required to close and reopen its popup in order to bring it to the front.

Your Telerik points were updated for your cooperation.

Regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ye
Top achievements
Rank 1
answered on 10 Oct 2011, 01:30 PM
  1. When the next internal build will be released?
  2. What should we do about this problem by now?
0
Boyan
Telerik team
answered on 10 Oct 2011, 04:59 PM
Hello Ye,

The internal build will be available for download tomorrow. Hope the fix will suit your needs.

Regards,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Trude
Top achievements
Rank 2
answered on 11 Oct 2011, 10:45 AM
It seems to be fixed now, thanks for the fast response!
To be clear; it's by design that the unloaded/loaded event fires for the window being brought to the front?
0
Miroslav Nedyalkov
Telerik team
answered on 11 Oct 2011, 01:32 PM
Hello Jorn,

It is not by design, but it is caused by a limitation in the framework - the popup control cannot be brought to the front without closing it, which causes this side effect. This will change if the popup start to support ZIndex or bring to front functionality.

Hope this information is helpful.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Trude
Top achievements
Rank 2
answered on 11 Oct 2011, 01:42 PM
Do you know if this is fixed in SL5?
0
Miroslav Nedyalkov
Telerik team
answered on 11 Oct 2011, 01:49 PM
Hello Jorn,

No, it works exactly the same way in the current version of SL5.

All the best,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Window
Asked by
Trude
Top achievements
Rank 2
Answers by
Miroslav Nedyalkov
Telerik team
Ye
Top achievements
Rank 1
Boyan
Telerik team
Trude
Top achievements
Rank 2
Share this question
or