NotifyPropertyChanged() triggering actions 2x
I'm using NotifyPropertyChanged in my code to notify Noesis when a property has changed. I also have a data trigger setup like this:
For some reason, the PlaySoundAction is called twice from the NotifyPropertyChanged() method; I'm not sure why. Can anyone explain this?
The callback happens 2x from the "native transition" from what i can tell..
thanks,
sam
Code: Select all
<ei:DataTrigger Binding="{Binding ActiveState}" Comparison="Equal" Value="2">
<ei:PlaySoundAction Source="play_ui_generic_click_01.wav"/>
</ei:DataTrigger>
Code: Select all
GUI.PlayAudio() at \NoesisGUI\Plugins\API\Core\NoesisGUI.cs:line 217
PlaySoundAction.Invoke() at \NoesisGUI\Plugins\API\Interactivity\PlaySoundAction.cs:line 53
TriggerAction.CallInvoke() at \NoesisGUI\Plugins\API\Interactivity\TriggerAction.cs:line 44
TriggerBase.InvokeActions() at \NoesisGUI\Plugins\API\Interactivity\TriggerBase.cs:line 82
DataTrigger.Evaluate() at \NoesisGUI\Plugins\API\Interactivity\DataTrigger.cs:line 88
DataTrigger.EvaluateBindingChange() at \NoesisGUI\Plugins\API\Interactivity\DataTrigger.cs:line 73
PropertyChangedTrigger.OnBindingChanged() at \NoesisGUI\Plugins\API\Interactivity\PropertyChangedTrigger.cs:line 38
PropertyMetadata.OnPropertyChanged() at \NoesisGUI\Plugins\API\Proxies\PropertyMetadataExtend.cs:line 129
[Native Transition]
Extend.NotifyPropertyChanged() at \NoesisGUI\Plugins\API\Core\Extend.cs:line 4494
NotifyPropertyChangedBase.NotifyPropertyChanged() at \Scripts\Runtime\Client\UI\Utilities\NotifyPropertyChangedBase.cs:line 76
thanks,
sam
-
-
sfernandez
Site Admin
- Posts: 2056
- Joined:
Re: NotifyPropertyChanged() triggering actions 2x
I created a small test trying to reproduce this but unfortunately it worked as expected.
I would need a bit more context to identify what could be happening.
Is that trigger part of some DataTemplate or Style?
Is it possible that it was defined in a style and then again locally in the element?
I would need a bit more context to identify what could be happening.
Is that trigger part of some DataTemplate or Style?
Is it possible that it was defined in a style and then again locally in the element?
Who is online
Users browsing this forum: No registered users and 1 guest