I have set up the binding at the design time. See the code below:
<Window x:Class="Microtech.TPM.Views.DestinationChoiceView"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:vmns="clr-namespace:Microtech.TPM.ViewModels"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=vmns:DestinationChoiceViewModel, IsDesignTimeCreatable=True}"
cal:Bind.AtDesignTime="True" Width="1280" Height="1024">
<Window.Resources>
<vmns:DestinationChoiceViewModel x:Key="ViewModelKey" />
</Window.Resources>
I need to subscribe for the events of the ViewModel. How to accomplish this if I have defined the reference to the ViewModel in Window.Resources and use it for the binding further in xaml? I quite don't understand how to use the same reference.