-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Global defined EventTriggers get triggered twice #24152
Copy link
Copy link
Open
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorspartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androidplatform/iosplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When using an EventTrigger in a global defined style the invoke method gets called twice.
When using a new Style with Key and applying it that way to the control it gets only called once.
Steps to Reproduce
- Create new Maui-App
- Add TriggerAction class for some control that generates console output when invoke is called. For example for the Editor control
- Change the global defined style in "Resources\Styles\Styles.xaml" for the control to use the TriggerAction in an EventTrigger. For example: adding "Focused" EventTrigger.
- Add control to MainPage.xaml
- Start application on any platform and focus the control on the MainPage
- See console output twice
Link to public reproduction project repository
https://github.com/SchittkowskiMS/MauiEventTriggerIssue
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows
Affected platform versions
iOS 17.5.1 Android 14 Windows 11
Did you find any workaround?
Not a good workarround but when setting this in a "named style" and then applying it to the control by key it works as expected.
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorspartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androidplatform/iosplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working