Trigger runtime exception

Hi,

What's wrong with this XAML that throws an exception at runtime

<StackPanel.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</StackPanel.Triggers>

Thanks,

Fernando



Answer this question

Trigger runtime exception

  • Kurt4949

    Thanks Unni.

    Yes, it works from within a Style.

    Fernando


  • JPedroFS

    Only EventTriggers are supported in this case - Property triggers are not, and hence the exception. To achieve this, you can try setting this via a style.

    Thanks,
    -Unni



  • Trigger runtime exception