I have a problem with Caliburn.Micro: I have ShellView.xaml and ShellViewModel.cs and I want to open new dialog window 'NewDialogView.xaml' from the ShellViewModel.
<StackPanel>
<Button x:Name="Click"
Content="Click"
/>
</StackPanel>
internal class ShellViewModel
{
public void Click()
{
Window newDialogView = new NewDialogView();
newDialogView.Show();
}
}
Then when a user is in that new window, he/she can click on the button and get some message:
<StackPanel>
<Button x:Name="ShowMessage"
Content="Click"
/>
</StackPanel>
internal class NewDialogViewModel
{
public void ShowMessage()
{
MessageBox.Show("Hello!");
}
}
The problem is that when a user clicks on the button in NewDialogView.xaml nothing happens. There is no messagebox with the content 'Hello'. Please help!