TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sam
NA
166
0
Moving events out of the Designer ?
Apr 1 2014 6:50 AM
Hi,
I have a form with many controls, each having events (and their handlers), total some tens events .
I found out that many times, due to complex combinations, events are being fired while the controls are being initiated, mainly because I load saved settings from my settings file that may change the default controls' initial settings, causing events to fire.
To avoid this, I moved all my events to a special method (in Main) that is being called only after all controls have been built and and set.
It works fine, but the question is if this is good or common practice and what drawbacks it may have.
I have also tried to move the events to a special Maim subclass, but could not find a way to get access to the private controls from the subclass.
Reply
Answers (
2
)
How can we add CSS file in Windows Phone 7.1 application?
Multiple Column AutocompleteBox in Silverlight