RoutedEventArgs.RoutedEvent (Propiedad)
.NET Framework 3.0
Gets or sets the RoutedEvent associated with this RoutedEventArgs instance.
Espacio de nombres: System.Windows
Ensamblado: PresentationCore (en presentationcore.dll)
Espacio de nombres XML: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Ensamblado: PresentationCore (en presentationcore.dll)
Espacio de nombres XML: http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @property */ public RoutedEvent get_RoutedEvent () /** @property */ public void set_RoutedEvent (RoutedEvent value)
public function get RoutedEvent () : RoutedEvent public function set RoutedEvent (value : RoutedEvent)
Los miembros de esta clase no se utilizan habitualmente en XAML o no se pueden utilizar en XAML.
Valor de propiedad
The identifier for the event that has been invoked.You cannot set this value on a RoutedEventArgs that has already been routed (for instance, if you obtained the arguments through a handler). Attempting to do so will generate an exception. You can only set it on an instance that has not yet been used to generate an invocation of the event.
The value of RoutedEvent cannot be referencia null (Nothing en Visual Basic) at any time.
The following example creates new routed event data with an initial constructor and then sets the RoutedEvent property as a subsequent operation. You must have RoutedEvent set prior to raising the routed event.
protected virtual void OnSelectedColorChanged(Color oldColor, Color newColor) { RoutedPropertyChangedEventArgs<Color> newEventArgs = new RoutedPropertyChangedEventArgs<Color>(oldColor, newColor); newEventArgs.RoutedEvent = ColorPicker.SelectedColorChangedEvent; RaiseEvent(newEventArgs); }