Class Page1
    Public Sub New()
        InitializeComponent()
    End Sub

    Private Sub UserControl_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
        TryCast(Me.Resources("DataContext"), ExampleViewModel).StartTimer()
    End Sub

    Private Sub UserControl_Unloaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
        TryCast(Me.Resources("DataContext"), ExampleViewModel).StopTimer()
    End Sub
End Class
