WPF version for Application.OpenForms

I have an application in which I will need to open another WPF window. In WinForms, I was able to use:

MainWindow main = (MainWindow)Application.OpenForms["MainWindow"];

To access the form. Now it does not exist in WPF. I saw another post on this site that matters, however it uses Application.Window , which is not contained in the call. I just:

  • Current
  • Equally
  • Getcontentstream
  • Getcookie
  • GetRemoteStream
  • Getresourcestream
  • Loadcomponet
  • RefrenceEquals
  • Resourceourcessembly
  • Setcookie

So my question is whether there is another version of OpenForms, or is there just another way to do this.

+3
source share
1 answer

: Application.Current. , Application.Current.Windows.

+2

Source: https://habr.com/ru/post/1746452/


All Articles