Catch Events from Within Templates
...
Now I want to throw the NextDocEvent from within c# code.
The definition of the Event:
public static readonly RoutedEvent NextDocEvent = EventManager.RegisterRoutedEvent( "NextDoc", RoutingStrategy.Tunnel, typeof( RoutedEventHandler ), typeof( MyPage ) );
public event RoutedEventHandler NextDoc
{
}
void RaiseNextDocEvent()
{
RaiseEvent(newEventArgs);
}
this approach seems not to work because I get this Error:
'MyPage.NextDocEvent' value cannot be assigned to property 'RoutedEvent' of object 'System.Windows.EventTrigger'. Value cannot be null.
Parameter name: value Error at object 'System.Windows.EventTrigger' in markup file

