View Issue Details

IDProjectCategoryView StatusLast Update
0001910NoesisGUIUnity3Dpublic2021-02-08 11:04
ReportersamcAssigned Tosfernandez 
Status resolvedResolutionfixed 
Product Version3.0.9 
Target Version3.0.10Fixed in Version3.0.10 
Summary0001910: PropertyChangedTrigger bug?
DescriptionI was trying to use PropertyChangedTrigger, but it appears to be triggering immediately on initialization, even though the value in my data model hasn't changed.

My setup looks something like this:

<ei:PropertyChangedTrigger Binding="{Binding LowHealthEvent}">
   // actions...

Is that expected? Is there a way around this? I don't want the trigger to fire until I've actually changed the value. It seems to work fine in all cases except startup. I set a breakpoint to ensure I'm not accidently notifying that it changed and it seems ok.


TagsNo tags attached.




2021-01-27 12:31

manager   ~0007001

Last edited: 2021-01-27 12:32

View 2 revisions

The behavior is expected because PropertyChangedTrigger.Binding default value is null, so when the Binding gets resolved for the first time it sets a value there different than null and the trigger is invoked.

But looking at the name of the bound property, "LowHealthEvent", it seems to me that you should use here an event trigger instead:
<noesis:DataEventTrigger Source="{Binding}" EventName="LowHealth">
   // actions...

Just define an event in your data model as explained in the trigger doc and raise it whenever you want:



2021-01-27 19:14

reporter   ~0007005

Ah, that makes sense. Thank you for explaining!

There are some other reasons why I want to keep it as an integer rather than an event (can go into those; it is related to some tools that our designers are using so they could hook things up like this without engineer intervention..)



Issue History

Date Modified Username Field Change
2021-01-27 01:55 samc New Issue
2021-01-27 11:59 jsantos Target Version => 3.0.10
2021-01-27 11:59 jsantos Description Updated View Revisions
2021-01-27 11:59 jsantos Assigned To => sfernandez
2021-01-27 11:59 jsantos Status new => assigned
2021-01-27 12:31 sfernandez Status assigned => feedback
2021-01-27 12:31 sfernandez Note Added: 0007001
2021-01-27 12:32 sfernandez Note Edited: 0007001 View Revisions
2021-01-27 19:14 samc Note Added: 0007005
2021-01-27 19:14 samc Status feedback => assigned
2021-02-05 18:06 sfernandez Status assigned => resolved
2021-02-05 18:06 sfernandez Resolution open => fixed
2021-02-05 18:06 sfernandez Fixed in Version => 3.0.10