noesis:StyleInteraction.Triggers not working in 3.2.8?
Hi.
I have a Button style that plays sound when clicked as follows:
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?
I have a Button style that plays sound when clicked as follows:
Code: Select all
<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>
Re: noesis:StyleInteraction.Triggers not working in 3.2.8?
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.
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.
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: noesis:StyleInteraction.Triggers not working in 3.2.8?
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?
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