I am diving in to Web 2.0. After getting everything to compile properly, I am having a problem with the Shown event. It seems if I subclass WebPage and then implement the Shown event in that subclass, it does not fire. However, if the Shown event is implemented in the WebPage class it works properly.
Seems like I am missing something obvious.
Edit: It seems that if I define a webpage (lets say WebPage2) and then create a subclass for WebPage2, events defined in that subclass will work. So essentially, I am prevented from putting anything between my screen layout and the WebPage class. I use this extensively so would prefer a resolution to above, but understand with Event Definitions and overriding methods I can communicate with common code subclasses that could mirror what I am currently doing with a little work, and the presence of these methods and event definitions in every new page I create.
My second observation won’t be feasible as a workaround I don’t think. I can’t think of an easy way to subclass it further and use common code in the process across most of my screen layouts.
did you create an event definition for “shown” and call it from the superclass with raiseevent ?
I have main class for webpages, and all my pages are subclasses of this super, and it works fine.
This might be limited to just the Shown Event. Other events such as Opening seem to work when defined in the subclasses of WebPage. Jean do you use the Shown event?
in fact not ! I did a subclass of a webpage for my pages, but there is nothing in it !
I’m more using webdialogs, and here I made a master webdialog superclass with lots of events in it.