0
我怎麼能傳遞一個參數到命令這樣傳遞一個TextBox.Text到命令
<TextBox x:Name="txtSearch" />
<Button Content="Search" Name="btnSearch" >
<Custom:Interaction.Triggers>
<Custom:EventTrigger EventName="Click">
<mx:EventToCommand Command="{Binding SearchCommand, Mode=OneWay}"
CommandParameter=txtSearch.Text />
</Custom:EventTrigger>
</Custom:Interaction.Triggers>
</Button>
謝謝!