Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

ExecutedRoutedEventArgs.Parameter Property

Gets data parameter of the command.

Namespace: System.Windows.Input
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

'Declaration
Public ReadOnly Property Parameter As Object
'Usage
Dim instance As ExecutedRoutedEventArgs
Dim value As Object

value = instance.Parameter

/** @property */
public Object get_Parameter ()

public function get Parameter () : Object

Members of this class are either not typically used in XAML, or cannot be used in XAML.

Property Value

The command-specific data. The default value is a null reference (Nothing in Visual Basic).

This property represents a generic data parameter that is defined by the particular command.

If this parameter is not needed, a null reference (Nothing in Visual Basic) can be passed.

Normally, the Parameter is used to pass specific information to the command when it is executed. The type of the data is defined by the command.

The following example creates an ExecutedRoutedEventHandler for a custom RoutedCommand. The handler updates a TextBox with the current time and the Value property of a Slider control that is passed to the handler through the ExecutedRoutedEventArgs.Parameter.

//  Executed Event Handler
//
//  Updates the output TextBox with the current seconds 
//  and the target second, which is passed through Args.Parameter.
private void CustomCommandExecuted(object sender, ExecutedRoutedEventArgs e)
{
    txtResults.Text = "Command Executed at " +
        DateTime.Now.Second + " seconds after the minute \n\n" +
        "The target second is set to " +
        e.Parameter;
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.