0

I have three project in one solution.

Project1 & Project2 & Project3.

In Project1 I have two .XAML files.

 1. Employee_Account.XAML 2. Employee_Address.XAML 

In Project2 I have one .XAML file.

 1.ViewEmployee.XAML 

In Project3 I have one .cs file.

1. Method.cs 

Method.cs --> Method Name

Public Void OpenEmployeeScree() { } 

In Project2 --> ViewEmployee.XAML, I have one button click event. Inside this click event i Called Project3 method for OpenEmployeeScree().

E.g:

Project2 :

Public void Button_Click(object sender, RoutedEventArgs e) { Project3 obj = new Project3(); obj.OpenEmployeeScree(); } 

when I click Project3-->ButtonClick event I would like to show Employee_Account.XAML.

How to do it.

2 Answers 2

2

Try this. This is the code you need.

Employee_Account empAcc = new Employee_Account(); MainWindow newWindow = new MainWindow { Owner = this }; newWondiw.Content = empAcc; newwindow.Show(); 
Sign up to request clarification or add additional context in comments.

1 Comment

Do not forget to add references of projects to call other Window from the project.
0

Although I have no idea why you would want to split all these things into 3 separate projects, but you can do this.

var acc = Project1_Namespace.Employee_Account(); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.