2015-01-29 3 views
-1

Windows phone 및 기타 플랫폼 개발에 익숙하지 않습니다. ContentDialog를 사용하여 내 앱에 로그인 화면을 추가하고 싶습니다. 나는 단서가 없으며 주 페이지 앞에 어떻게 보이게하는지에 대한 예로서 아무것도 발견하지 못했습니다.Windows phone 8.1 시작 로그인 메인 페이지 이전의 ContentDialog 시작

+0

중복 가능성에 아래의 코드를 배치하여 내 문제를 해결 괭이는 HTTP ([윈도우 폰 8.1에서 전체 화면 모달 ContentDialog 표시 방법] : // 유래를 .com/questions/24372271/how-to-show-a-full-screen-modal-contentdialog-in-windows-phone-8-1) – kennyzx

+0

@kennyzx 감사합니다. – chris

답변

1

@kennyzx 저에게 링크를 가르쳐 주셔서 감사합니다. 여기에 내가 내 'App.xaml.cs를'

protected async override void OnWindowCreated(WindowCreatedEventArgs e) 
    {    
     //Lunch ContentDialog 
     LoginPage signInDialog = new LoginPage(); 
     await signInDialog.ShowAsync(); 

     if (signInDialog.Result == SignInResult.SignInOK) 
     { 
      // Sign in was successful. 

     } 
     else if (signInDialog.Result == SignInResult.SignInFail) 
     { 
      // Sign in failed. 
      // Exit the app after three attempts     
      Application.Current.Exit(); 
     } 
     else if (signInDialog.Result == SignInResult.SignInCancel) 
     { 
      // Sign in was cancelled by the user. 
      // Exit the app 
      Application.Current.Exit(); 
     } 
    }