C# 在Windows Phone SDK 7.1中启动应用程序时的调用方法
我需要在应用程序启动时调用一个通常由mainpage.xaml按钮触发的方法。 我是否需要使用app.xaml的应用程序启动方法?如果是,如何进行C# 在Windows Phone SDK 7.1中启动应用程序时的调用方法,c#,visual-studio-2010,windows-phone-7,C#,Visual Studio 2010,Windows Phone 7,我需要在应用程序启动时调用一个通常由mainpage.xaml按钮触发的方法。 我是否需要使用app.xaml的应用程序启动方法?如果是,如何进行 谢谢您的目标应该是尽快显示MainPage.xaml 与其实际调用该方法,不如只设置一个布尔值来指示应该调用它,然后在MainPage.xaml.cs内调用该方法(或者以项目的结构方式) App.xaml.cs: public static bool IsInitialLaunch = true; MainPage.xaml.cs 已加载事件: i
谢谢您的目标应该是尽快显示MainPage.xaml 与其实际调用该方法,不如只设置一个布尔值来指示应该调用它,然后在MainPage.xaml.cs内调用该方法(或者以项目的结构方式) App.xaml.cs:
public static bool IsInitialLaunch = true;
MainPage.xaml.cs
已加载事件:
if (App.IsInitialLaunch){
SomeMethod();
App.IsInitialLaunch = false;
}