Share via


ExecutedRoutedEventArgs.Parameter Özellik

Tanım

komutunun data parametresini alır.

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

Özellik Değeri

Komuta özgü veriler. null varsayılan değerdir.

Örnekler

Aşağıdaki örnek, özel RoutedCommandiçin bir ExecutedRoutedEventHandler oluşturur. İşleyici, ile işleyiciye geçirilen bir denetimin Slider geçerli saati ve Value özelliğini ile güncelleştirirTextBox.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

Açıklamalar

Bu özellik, belirli bir komut tarafından tanımlanan genel bir veri parametresini temsil eder.

Bu parametre gerekli değilse geçirilebilir null .

Normalde, Parameter yürütülürken komutuna belirli bilgileri geçirmek için kullanılır. Verilerin türü komutu tarafından tanımlanır.

Şunlara uygulanır

Ayrıca bkz.