Hi.
I make pop-up message for my application. this form is on wpf, and in the a thread i check a value and for some result , I show that pop-up to show message.
In the thread when I create pop-up class(type of WPF window class) an error throw by pop-up Contractor. "The calling thread must be STA, because many UI components require this"
What do I do?
//-------new edit :(
I use this for show my form in thread but still have error !!(cuz thread.start() in the timer thread)
System.Threading.Thread Messagethread = new System.Threading.Thread(
new System.Threading.ThreadStart(delegate()
{
System.Windows.Threading.DispatcherOperation DispacherOP = frmMassenger.Dispatcher
.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(
delegate()
{
frmMassenger.Show();
}
));
} ));
Messagethread.Start();