0
我已經創建了一個自定義用戶控件和一個進度疊加來獲得像動畫一樣的加載屏幕。通過Progress.Show()和Progress.Hide()訪問。當我從外部API獲取數據時,如何使用這些數據?WP7創建一個加載動畫
我已經創建了一個自定義用戶控件和一個進度疊加來獲得像動畫一樣的加載屏幕。通過Progress.Show()和Progress.Hide()訪問。當我從外部API獲取數據時,如何使用這些數據?WP7創建一個加載動畫
當你正在做SomeWebClient.DownloadDataAsync()
,它有一個具有progress changed event,您可以利用像這樣:
private static void DownloadProgressCallback(object sender, DownloadProgressChangedEventArgs e)
{
// Displays the operation identifier, and the transfer progress.
Console.WriteLine("{0} downloaded {1} of {2} bytes. {3} % complete...",
(string)e.UserState,
e.BytesReceived,
e.TotalBytesToReceive,
e.ProgressPercentage);
}
但是我的自定義加載屏幕不會在靜態函數加載。 –