Este tema aún no ha recibido ninguna valoración - Valorar este tema

RoutedEventArgs.RoutedEvent (Propiedad)

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

public RoutedEvent RoutedEvent { get; set; }
/** @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.
Tipo de excepciónCondición

InvalidOperationException

Attempted to change the RoutedEvent value while the event is being routed.

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);
}

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0
¿Te ha resultado útil?
(Caracteres restantes: 1500)

Adiciones de comunidad

AGREGAR
© 2013 Microsoft. Reservados todos los derechos.