在Windows Phone 8.1中使用Thread [英] using Thread in windows phone 8.1
本文介绍了在Windows Phone 8.1中使用Thread的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi
此代码用于在Windows Phone 8.0中使用线程
Hi
this code for work with thread in windows phone 8.0
private void Start_Example()
{
for (i = 0; i < 1000; i++)
{
Thread.Sleep(100);
this.Dispatcher.BeginInvoke(() =>
{
lblResult.Text = i.ToString();
});
}
}
private void btnStart_Click(object sender, RoutedEventArgs e)
{
ThreadStart st = new ThreadStart(Start_Example);
Thread s = new Thread(st);
s.Start();
}
但我的问题是如何在Windows Phone 8.1中使用类似这样的代码?
有了尊重
but my question is how to use thread like this code in windows phone 8.1?
With Respect
推荐答案
如果这是商店应用,请查看 Windows Phone 8.1的新API [ ^ ]
If this is a store app, have a look at new APIs for windows phone 8.1[^]
这篇关于在Windows Phone 8.1中使用Thread的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文