<StackPanel>
<TextBox Text="" x:Name="input"/>
<Button Content="Click">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click"><!-- TextBox has to contain "ABC" to get Button Click enabled this event-->
<i:InvokeCommandAction Command="{Binding OnAdd}" CommandParameter="1"></i:InvokeCommandAction>
</i:EventTrigger>
<i:EventTrigger EventName="Click"><!-- TextBox has to contain "123" to get Button Click enabled this event-->
<i:InvokeCommandAction Command="{Binding OnAdd2}" CommandParameter="1"></i:InvokeCommandAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
我希望<i:EventTrigger EventName="Click">
TextBox 必须包含“ABC”才能使按钮单击启用此事件