User avatar
nadjibus
Topic Author
Posts: 36
Joined: 24 Feb 2022, 04:09

noesis:StyleInteraction.Triggers not working in 3.2.8?

13 Jul 2025, 21:36

Hi.

I have a Button style that plays sound when clicked as follows:
<Style x:Key="Style.MyGameButtonBase"
           BasedOn="{StaticResource Style.ButtonBase}"
           TargetType="ButtonBase">
    <Setter Property="noesis:StyleInteraction.Triggers">
        <Setter.Value>
            <noesis:StyleTriggerCollection>
                <b:EventTrigger EventName="Click">
                    <b:PlaySoundAction Source="/Audio/UI/click3.wav" />
                </b:EventTrigger>
            </noesis:StyleTriggerCollection>
        </Setter.Value>
    </Setter>
</Style>
It used to work correctly, but stopped working when I updated to 3.2.8 (I was on 3.2.5). Something changed or should I fill a bug report?
 
rendiaper
Posts: 1
Joined: 15 Jul 2025, 06:43

Re: noesis:StyleInteraction.Triggers not working in 3.2.8?

15 Jul 2025, 06:46

Hi!
As a quick test, try moving the trigger logic into the control's actual template or a Behavior instead of using StyleTriggerCollection, and see if the sound plays. If it works there, it’s likely a regression or behavioral change in how triggers are handled in styles.
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: noesis:StyleInteraction.Triggers not working in 3.2.8?

15 Jul 2025, 12:25

This must be a bug we introduced if it was working in previous versions. Could you please report it in our bugtracker?

Anyway, that same code is used in our Buttons sample included in 3.2.8 package and it works perfectly fine. Is your button part of a template or do you get any warning/error in the console when playing?

Who is online

Users browsing this forum: Bing [Bot] and 4 guests