Search code examples
c#windows-phone-7windows-phone

which method is first called when a xaml page is loaded in windows phone by default?


I want to know which method is first called by default when a xaml page is loaded in windows phone app and how can I change the method which has to be called first on load?


Solution

  • To directly answer your question: Initialize is the event you are looking for.

    For more detailed information, Google is your friend:

    Application lifecycle - http://msdn.microsoft.com/en-us/windowsphonetrainingcourse_applicationlifetimewp7lab_topic2.aspx

    Controls and other objects should follow the standard event lifecycle:

    http://msdn.microsoft.com/en-us/library/ms754221.aspx