I mean the following: I have a custom control which has StateChangedEvent:
public class WindowControl : ContentControl
{
public static readonly RoutedEvent StateChangedEvent;
static WindowControl()
{
WindowControl.StateChangedEvent = EventManager.RegisterRoutedEvent("StateChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(WindowControl));
}
public event RoutedEventHandler StateChanged
{
add { base.AddHandler(WindowControl.StateChangedEvent, value); }
remove { base.RemoveHandler(WindowControl.StateChangedEvent, value); }
}
}
so Now I need PreviewStateChangedEvent - how do I need to declare it (to link it to the bubble event) in order it being generated before StateChangedEvent?