StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



WizardControl PageActivated EventExpand / Collapse
Author
Message
Posted 10/21/2006 1:33:49 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/09/2007 2:48:58 PM
Posts: 57, Visits: 107
The WizardControl PageActivated event (which is distinct from the WizardPage PageActivated event) passes the PreviousPage as a property in the PageEventArgs.

Well and good, but it would be nice to have the CurrentPage as a property in the PageEventArgs as well. Why?

Generally, it could provide a way to consolidate PageActivated handling in a single method for all the pages versus implementing PageActivated for each individual WizardPage. I'm not talking about having a huge switch & case statement, although there are cases where that would be preferred to a bunch of individual methods (I suppose). I'm more talking about situations where the data I need is already a property of the WizardPage itself and I could write one generic handler for a PageActivated events.

Specifically, in my wizard, I am collecting data points for a BO and populating it gradually through the pages of the wizard. Because it's fairly complicated, I am also providing RTF instructions along with each step. Each WizardPage has an RTF control that I want to bind to a WizardInstructionsBO, which has only two fields: WizardPageName (key), and InstructionsRTF.

I can't bind the RTF controls on the WizardPages to the primary BO because they are not distinct values in the primary BO. I could have a dozen RTF fields in the primary BO that would be identical for every row, but that seems a waste...

Anyway, having the CurrentPage passed as part of PageEventArgs would make this and similar scenarios easier to handle, and I have to believe this would be an easy change in the framework as well.

Thanks!

Post #3759
Posted 10/22/2006 11:17:38 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 5:33:19 PM
Posts: 4,771, Visits: 4,735
Chris,

I am more than willing to accomodate you on this but I do not see the point.  Let me explain...if you are handling the PageActivated event within the page itself, the current page would just be (Me) or (this).  It would be itself.  If you are handling the PageActivated event of the wizard control, all you need to do is reference the CurrentPage property of the wizard control:

this.WizardControl.Currentpage

Let me know if this does not meet your needs.

Post #3768
Posted 10/22/2006 11:26:07 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/09/2007 2:48:58 PM
Posts: 57, Visits: 107
Yep, I was trying to handle within the WizardControl, and I now see the CurrentPage property. That works perfectly! Thanks!
Post #3771
Posted 10/22/2006 11:52:25 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 5:33:19 PM
Posts: 4,771, Visits: 4,735
Good deal! 
Post #3777
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 12:19am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 11 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.