有沒有其他人有Windows Phone 8的SkyDrive API的問題?我升級我的Windows Phone 7的代碼到Windows Phone 8。當我點擊登錄按鈕(網盤),我得到了以下畫面:skydrive api windows phone 8
此代碼(從WP7不變)用於VS2010工作。 其他人有這個問題嗎?是否有我應該使用的更新版本(當前版本v2.0.50727)?
當前XAML:
HorizontalAlignment="Left" Margin="308,71,0,0"
Name="signInButton1" VerticalAlignment="Top" Width="160"
ClientId="[myID]" Scopes="wl.skydrive_update"
TextType="SignIn" SessionChanged="btnSignin_SessionChanged"
Branding="Windows"/>
登錄後臺代碼:
private void btnSignin_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
{
if (e.Status == LiveConnectSessionStatus.Connected)
{
client = new LiveConnectClient(e.Session);
infoTextBlock.Text = "Signed in.";
client.GetCompleted +=
new EventHandler<LiveOperationCompletedEventArgs>(OnGetCompleted);
client.GetAsync("me", null);
for (var i = 0; i < this.ApplicationBar.Buttons.Count; i++)
{
var button = this.ApplicationBar.Buttons[i] as ApplicationBarIconButton;
if (button != null)
{
if (button.Text == "Upload")
{
button.IsEnabled = true;
}
}
}
}
else
{
infoTextBlock.Text = "Not signed in.";
client = null;
}
}
更新!
我一直在嘗試,我仍然得到這個白色的屏幕。然而,我點擊放大鏡,然後點擊後退箭頭(它恢復),然後嘗試再次登錄,它的工作。那麼這只是不吉利還是什麼?
如果你在模擬器上,這可能是一個模擬器遲緩的問題;) – Typist