Problem solved! I had ICommand for DisplayInfoCommand defined in the wrong ViewModel i.e. ListBoxViewModel, when it should have been defined in my ListBoxItemViewModel where the FieldLabel is actually defined.
Tap event using EventTrigger not triggered with windows phone 8
-
02-06-2022 - |
题
Any idea why my EventTrigger is not being triggered for my item which is part of a listboxitem template using the following code:
<TextBlock Text="{Binding FieldLabel}" Grid.Column="0" Margin="5,0,0,0" Foreground="Black">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Tap">
<i:InvokeCommandAction x:Name="FieldLabelTap" Command="{Binding DisplayInfoCommand, Mode=OneWay}" CommandParameter="{Binding}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
I've spent a ridiculous amount of time on this, but I just can't figure out what I'm doing wrong or what I'm missing.
Thanks.
解决方案
不隶属于 StackOverflow