Hello
My application looks like this:
1 Window
2 Frame
3 Page
4 Control
In Control (4) I have a custom routed event, which i want Frame (2) to handle.
The event:
public static readonly RoutedEvent PreviewArtistLinkClickedEvent = EventManager.RegisterRoutedEvent(
"PreviewArtistLinkClicked", RoutingStrategy.Tunnel, typeof(RoutedEventHandler), typeof(Hyperlink));
public event RoutedEventHandler PreviewAlbumLinkClicked {
add { AddHandler(PreviewAlbumLinkClickedEvent, value); }
remove { RemoveHandler(PreviewAlbumLinkClickedEvent, value); }
}
void RaisePreviewArtistLinkClickedEvent(object sender, RoutedEventArgs e) {
RoutedEventArgs eventArgs = new RoutedEventArgs(Tracklist.PreviewArtistLinkClickedEvent);
RaiseEvent(eventArgs);
}
And the frame XAML:
<Frame Name="frameContent" Grid.Column="1" Background="#373737" NavigationUIVisibility="Hidden"
gui:Tracklist.PreviewArtistLinkClicked="frameContent_PreviewArtistLinkClicked"/>
Compiles fine but this happens:
Cannot find DependencyProperty or PropertyInfo for property named 'PreviewArtistLinkClicked'.