EventTrigger for Pivot Control

Sep 5, 2014 at 8:43 PM
I am seeing an issue using EventTrigger with a Pivot control. I have the following XAML:

<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
    <command:EventToCommand
        Command="{Binding MainViewModel.ForecastPivotChanged, Mode=OneWay, Source={StaticResource Locator}}"
        CommandParameter="{Binding SelectedItem, ElementName=userLocations}" />
</i:EventTrigger>
</i:Interaction.Triggers>

When the ForecastPivotChanged is called the selected item that is passed in is the previous pivot item -- meaning it is the pivot item that you're moving away from.

If I attach SelectionChanged event handler to the view's code behind I can see that the SelectedIndex index is correct when the event fires.

Is this a bug in MVVM Lite or am I doing something wrong?