私はuwpプロジェクトでバックグラウンドワーカーを使用しています。ここでは、バックグラウンドワーカーが実行されている間に読み込みイメージを表示します。バックグラウンドワーカータスクの完了後、ローディングイメージは不可視でなければなりません。 どうすればいいですか?バックグラウンドワーカーの実行中にuwpでイメージをロードする方法
BackgroundWorker productPrices = new BackgroundWorker();
productPrices.DoWork += new DoWorkEventHandler(productPrices_Dowork);
productPrices.RunWorkerCompleted += productPrices_RunWorkerCompleted;
productPrices.WorkerSupportsCancellation = true;
productPrices.ProgressChanged += new ProgressChangedEventHandler(productPrices_ProgressChanged);
productPrices.WorkerReportsProgress = true;
private async void productPrices_Dowork(object sender, DoWorkEventArgs e)
{
progressring.Visibility = Visibility.Visible;
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
{
string customerId = Application.Current.Resources[Constants.CUSTOMER_ID].ToString();
string username = Application.Current.Resources[Constants.EMAIL_ID].ToString();
string strIpAddress = Application.Current.Resources[Constants.IP_ADDRESS].ToString();
string strPortNumber = Application.Current.Resources[Constants.PORT_Number].ToString();
RequestHeader requestHeader = DBHelper.GetRequestHeader(customerId, customerId, username);
string strStoreLocation = Application.Current.Resources[Constants.STORE_LOCATION].ToString();
int startIndex = 0;
await ProductAgent.GetProductPrices(requestHeader, strIpAddress, strPortNumber, strStoreLocation);
});
}
確かに私たちは、あなたはそれが起こっ作るために何かをしようとしたことを行うことができますか? –
私の質問を編集しました – Archana
実際に使用できるUWPプラットフォームには何かが組み込まれています。あなたのニーズに合っているのでしょうか、それともカスタム画像にする必要がありますか?後者の場合、いくつかのヒント – Takarii