0

I'm trying to get a basic EventTrigger to work with a Storyboard and a UIElement. I'm using GalaSoft MVVMLight on Windows Phone 7.

Here's what I have for an ellipse.

<Ellipse x:Name="EquipmentSlot_CPU" Height="55" Stroke="Black" Fill="#FFA1A1A1" Margin="1,0,0,0" VerticalAlignment="Top"
        Width="55" HorizontalAlignment="Left">
    <Ellipse.Triggers>
        <EventTrigger RoutedEvent="UIElement.MouseLeftButtonDown">
            <BeginStoryboard Storyboard="{StaticResource InventorySlotTransition_Start}" />
        </EventTrigger>
    </Ellipse.Triggers>
    <Custom:Interaction.Triggers>
        <Custom:EventTrigger EventName="MouseLeftButtonDown">
            <Command:EventToCommand x:Name="cpu_Click"
                    Command="{Binding InventoryViewModel.Command_EquipmentSlotSelected, Mode=OneWay, Source={StaticResource Locator}}"
                    CommandParameter="CPU" />
        </Custom:EventTrigger>
    </Custom:Interaction.Triggers>
</Ellipse>

However, I get an XAMLParseException stating that it Failed to assign to property 'System.Windows.EventTrigger.RoutedEvent'.

I'd like to be able to get this to work with a Storyboard as well, but that seems to come with it's own set of issues.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72

0 Answers0