Hello,
I'm trying to use one paralel thread to update some properties from XAML components at runtime, and I don’t want to use the Windows.System.Threading.ThreadPool component
instead of System.Threading.Thread. I did some tests using C#, and on the line commented below it throw a catastrophic error “Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))”.
See on the piece of code bellow.
private
void TheadStartButton_Click(object
sender, RoutedEventArgs e)
{
System.Threading.Thread
MyThread = new System.Threading.Thread(new
System.Threading.ThreadStart(ThreadMethod));
System.Threading.Thread.Sleep(2000);
MyThread.Start();
}
void ThreadMethod()
{
Windows.UI.Popups.MessageDialog
BoxOk = new Windows.UI.Popups.MessageDialog("Thread
running...");
BoxOk.ShowAsync().Start();
//MyTextBlock.Text = "Test...";
}
Thank you very much for any support.