Hi All,
I am doing a SilverLight application using MVVM. In that I have 2 csproj - Diagnosis and PatientDetails. In Diagnosis , i ve Medication.xaml which is a childwindow. The ViewModel name which Medication.xaml refers to is MedicationViewModel. In PatientDetails i ve AddnewAllergy.xaml and SaveAllergy.xaml. The ViewModel that both these xaml refers to is AllergyViewModel. Now my problem is from MedicationViewModel , i ve to show AddnewAllergy.xaml. In this situation, Medication.xaml has to be invisible. From AddnewAllergy, on clicking the button , it should close the AddnewAllergy.xaml and show the SaveAllergy.xaml. After saving the details, should close the SaveAllergy.xaml and Medication.xaml has to be visible.
How can i do this?? The problem is how can i show the xaml which is in a different project.
Anyone please help. Any help is highly appreciated.
Thanks in advance.

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Aug 23, 2011, 11:27 PM EDT
Add the Diagnosis project reference to PatientDetails project.
Add the namespace of the controls defined in PatientDetails projects to the Diagnosis project xaml page you want and use the control.
oc A28 reputationPosted Aug 24, 2011, 1:05 AM EDT
I ve added PatientDetails reference to Diagnosis. But the problem is... in MedicationViewModel , i am making the Medication.xaml invisible and calling the AddnewAllergy.xaml. After processing the functions in AllergyViewModel, it has to again make the Medication.xaml visible. How can i do this ??
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Aug 24, 2011, 4:33 AM EDT
oc A28 reputationPosted Aug 25, 2011, 10:47 PM EDT
Mahadesh MahalingappaRank #331 · 7.5K reputationPosted Aug 26, 2011, 1:49 AM EDT