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

Events firing on Page Load

0 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hemanth
Top achievements
Rank 1
Hemanth asked on 19 Dec 2012, 09:23 AM
Hi,,

In my silverlight application, events are firing before UserControl_Loaded.

for ex 1:

i have one usercontrol Test.xaml, in that i have radgrid and i m binding that radgrid in a method(say BindGrid()),
in main page for SelectionChanged on radcombox , i generated Delegate and its event. In Test.xaml that event will fire and on that i have called BindGrid().

Problem is when i load Test.xaml, first radcombox_SelectionChanged selection changed will fire(which is in main page) after that UserControl_Loaded will fire
this should not happen for me, only UserControl_Loaded must fire,
1. it's not being triggered by a user action
2. it will execute the logic in SelectionChanged event, probably unnecessarily, increasing start up/rendering time

for ex 2:

i have one usercontrol Test.xaml, in that UserControl.Resorces of Test.xaml i have radcombox  for that i have event SelectionChanged ,
same problem first SelectionChanged of radcombox will fire than UserControl_Loaded, only UserControl_Loaded must fire



can some help me for this pls.

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Hemanth
Top achievements
Rank 1
Share this question
or