I have a custom event and want to attach a property (a string would be fine) to it. What do I need to change in my code:
public static readonly RoutedEvent ModelClickEvent = EventManager.RegisterRoutedEvent(
"ModelClick", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(InfoBox));
// Provide CLR accessors for the event
public event RoutedEventHandler FadeIn
{
add { AddHandler(ModelClickEvent, value); }
remove { RemoveHandler(ModelClickEvent, value); }
}
// This method raises the Tap event
void RaiseTapEvent()
{
RoutedEventArgs newEventArgs = new RoutedEventArgs(InfoBox.FadeInEvent);
RaiseEvent(newEventArgs);
}