Aracılığıyla paylaş


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. Varsayılan değer null değeridir.

Örnekler

Aşağıdaki örnek, özel RoutedCommandbir için bir ExecutedRoutedEventHandler oluşturur. İşleyici, ile işleyiciye TextBox geçirilen geçerli saat ve Value denetimin SliderExecutedRoutedEventArgs.Parameterözelliği ile güncelleştirir.

//  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ü komutuyla tanımlanır.

Şunlara uygulanır

Ayrıca bkz.