wpf 怎么调用子线程窗口的方法?
publicThreadnewWindowThread;publicMaskLayer(){InitializeComponent();newWindowThread=n...
public Thread newWindowThread;
public MaskLayer()
{
InitializeComponent();
newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint));
newWindowThread.SetApartmentState(ApartmentState.STA);
newWindowThread.IsBackground = true;
newWindowThread.Start();
}
public void ThreadStartingPoint()
{
LoadingWin loadingWin = new LoadingWin();
loadingWin.Show();
Dispatcher.Run();
}
我这样开启了一个新的线程,开启一个类似进度条的窗体,我怎么能让我的主线程的窗体响应Activated事件时,触发一下loadingWin的Activate()方法? 展开
public MaskLayer()
{
InitializeComponent();
newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint));
newWindowThread.SetApartmentState(ApartmentState.STA);
newWindowThread.IsBackground = true;
newWindowThread.Start();
}
public void ThreadStartingPoint()
{
LoadingWin loadingWin = new LoadingWin();
loadingWin.Show();
Dispatcher.Run();
}
我这样开启了一个新的线程,开启一个类似进度条的窗体,我怎么能让我的主线程的窗体响应Activated事件时,触发一下loadingWin的Activate()方法? 展开
展开全部
建议你到 http://bbs.silverlightchina.net/ 这里提问
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询