Timur Mustafaev
Timur Mustafaev

Reputation: 4929

Get WPF Window class name. C#

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?

Upvotes: 1

Views: 5612

Answers (1)

Thomas Levesque
Thomas Levesque

Reputation: 292685

string name = theWindow.GetType().Name;

Upvotes: 12

Related Questions