Get WPF Window class name. C#

2019-08-09 02:16发布

问题:

I need to get string value from WPF Window class? For example I have an instance of MainWorkspace window class, and I want to get this "MainWorkspace" string. How to do this?

回答1:

string name = theWindow.GetType().Name;


标签: c# .net wpf window