Navigation Events in VB.Net

Aug 25, 2014 at 4:37 PM
Edited Aug 25, 2014 at 4:42 PM
Hi,

I am trying to handle Navigation Events, with the code in VB.Net - I have tried the following:

In MainWindow:
Public Interface Icontent
    Sub OnFragmentNavigation(e As FragmentNavigationEventArgs)
    Sub OnNavigatedFrom(e As NavigationEventArgs)
    Sub OnNavigatedTo(e As NavigationEventArgs)
    Sub OnNavigatingFrom(e As NavigatingCancelEventArgs)
End Interface
In Page:
    Inherits UserControl
    Implements Icontent

    Public Sub OnNavigatedTo(e As NavigationEventArgs) Implements Icontent.OnNavigatedTo
        MsgBox("Handled")
    End Sub
But the events don't seem to fire. I have tried including the Interface into the FirstFloor.ModernUI.Windows Namespace as follows:
Namespace FirstFloor.ModernUI.Windows
    Public Interface Icontent
        Sub OnFragmentNavigation(e As FragmentNavigationEventArgs)
        Sub OnNavigatedFrom(e As NavigationEventArgs)
        Sub OnNavigatedTo(e As NavigationEventArgs)
        Sub OnNavigatingFrom(e As NavigatingCancelEventArgs)
    End Interface
End Namespace
But again, this doesn't work?

The standard WPF events - I.E. Initialized - work fine.

Thanks in advance!
Aug 25, 2014 at 5:18 PM
Apologies: I was trying to implement my own interface, when I should have been implementing IContent from the existing Namespace

Thanks