问题描述
我有一个应用程序中,我将获得的是开放另一个WPF窗口。在的WinForms,我可以使用:
I have an application in which I will have to get at another WPF window which is open. In WinForms, I was able to use:
MainWindow main = (MainWindow)Application.OpenForms["MainWindow"];
要能够访问的形式。现在,在WPF它不存在。我所看到的不过其他在这个网站是相关的,它使用的 Application.Window 这是不包含在呼叫。我只是有:
To be able to access the the form. Now in WPF it does not exist. I have seen the other post on this site which is relevant, however it uses Application.Window which is not contained in the call. I just have :
- 电流
- 等于
- GetContentStream
- 的getCookie
- GetRemoteStream
- GetResourceStream
- LoadComponet
- RefrenceEquals
- ResourceAssembly
- 的setcookie
- Current
- Equals
- GetContentStream
- GetCookie
- GetRemoteStream
- GetResourceStream
- LoadComponet
- RefrenceEquals
- ResourceAssembly
- SetCookie
所以我的问题是这样的,有一个不同的版本OpenForms,还是有只是用不同的方式去了解它。
So my question is this, is there a different version for OpenForms, or is there just a different way to go about it.
推荐答案
尝试寻找: Application.Current
。更具体地说, Application.Current.Windows
。
Try looking at: Application.Current
. More specifically, Application.Current.Windows
.
这篇关于Application.OpenForms的WPF版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!