このコードの「RootFrame=」行はすべて自動生成されます。
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized)
return;
// Create the frame but don't set it as RootVisual yet; this allows the splash
// screen to remain active until the application is ready to render.
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
// Handle navigation failures
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
// Handle reset requests for clearing the backstack
RootFrame.Navigated += CheckForResetNavigation;
// Ensure we don't initialize again
phoneApplicationInitialized = true;
}
...次の場合に失敗します:
*System.TypeInitializationExceptionはユーザーコードによって処理されませんでしたHResult=-2146233036メッセージ=「TaSLS_PhoneApp.App」のタイプ初期化子が例外をスローしました。Source = TaSLS_PhoneApp
TypeName = TaSLS_PhoneApp.App StackTrace:at TaSLS_PhoneApp.App.set_RootFrame(PhoneApplicationFrame value)at TaSLS_PhoneApp.App.InitializePhoneApplication()at TaSLS_PhoneApp.App..ctor()InnerException:System.NotImplementedException HResult = -2147467263 Message =または操作が実装されていません。Source = Windows StackTrace:at Windows.Storage.ApplicationData.get_RoamingSettings()at TaSLS_PhoneApp.App..cctor()InnerException:*