Page Change Event?

Oct 2, 2011 at 8:35 AM

I may be overlooking something that is very obvious but I've been pouring over the code for a few hours and read some in the original blog post but I still don't have an answer. I have some processes that need to start when a new page is activated, or is actually the case made visible. My internal page user control is GetOfficeList(), and there is a method generated that is private void GetOfficeList_Load(object sender, EventArgs e), however this doesn't ever seem to be triggered, or maybe it's triggered when the application starts since it seems that all the pages are loaded at runtime, I don't know. The only event I've been able to find so far that loads when the page changes is Banner_Load(), but this loads before the actual page so my label text doesn't update since the controls aren't actually initialized yet. So if anyone has any clue that would be greatly appreciated because my next option is building the wizard app from scratch and that's something I really don't want to do because the ugly logic I would have to impliment to get it built fast makes me upset and I'll force myself to learn WPF since Winforms is "dead". I'm building this for work and will no doubt be stuck maintaining it until I die so it would be nice to be using some kind of framwork. Any feedback is appreciated.

Coordinator
Oct 2, 2011 at 5:48 PM

The "Load" event is, or at least should be, fired when the page is first made active. The event that you're probably looking for is "SetActive".

Oct 6, 2011 at 6:21 PM

Yep, I actually found that just last night. I tried the load event but that actually gets triggered at application runtime since all the pages are loaded into the panel at the start. Thanks for the quick response and thanks for posting this good piece of software.