The show () method in my wpf does not work

1

I made a tiny desktop application using wpf. I have a very simple login screen and this screen should call the main screen. I did so:

Menu menu = new Menu();
menu.Show();

You're making a mistake in the show, saying it's not recognized. The System.Windows namespace is added to the project.

    
asked by anonymous 08.08.2017 / 00:53

1 answer

1

The problem is that the Menu class of your code refers to class System.Windows.Controls.Menu .

Type the full name of your class Menu or set an alias for your namespace (or System.Windows.Controls ). The important thing is to remove the ambiguity.

var menu = new SeuNamespace.Menu();
menu.Show();
    
08.08.2017 / 01:11