Page 1 of 1

noesis:StyleInteraction.Triggers not working in 3.2.8?

Posted: 13 Jul 2025, 21:36
by nadjibus
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?

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

Posted: 15 Jul 2025, 06:46
by rendiaper
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.

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

Posted: 15 Jul 2025, 12:25
by sfernandez
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?