ExecutedRoutedEventArgs.Parameter 속성

정의

명령의 데이터 매개 변수를 가져옵니다.

public:
 property System::Object ^ Parameter { System::Object ^ get(); };
public object Parameter { get; }
member this.Parameter : obj
Public ReadOnly Property Parameter As Object

속성 값

명령별 데이터입니다. 기본값은 null입니다.

예제

다음 예제에서는 사용자 지정 RoutedCommandExecutedRoutedEventHandler 대한 를 만듭니다. 처리기는 를 통해 처리기에 전달되는 컨트롤의 Slider 현재 시간 및 Value 속성을 사용하여 을 업데이트 TextBox 합니다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;
}
'  Executed Event Handler
'
'  Updates the output TextBox with the current seconds 
'  and the target second, which is passed through Args.Parameter.
Private Sub CustomCommandExecuted(ByVal sender As Object, ByVal e As ExecutedRoutedEventArgs)
    txtResults.Text = "Command Executed at " & Date.Now.Second & " seconds after the minute " & vbLf & vbLf & "The target second is set to " & e.Parameter.ToString()
End Sub

설명

이 속성은 특정 명령에 의해 정의된 제네릭 데이터 매개 변수를 나타냅니다.

이 매개 변수가 필요하지 않은 경우 를 null 전달할 수 있습니다.

일반적으로 Parameter 명령이 실행 될 때 특정 정보를 전달 하는 데 사용 됩니다. 데이터 유형의 명령에 의해 정의 됩니다.

적용 대상

추가 정보