Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global defined EventTriggers get triggered twice #24152

Open
SchittkowskiMS opened this issue Aug 12, 2024 · 3 comments
Open

Global defined EventTriggers get triggered twice #24152

SchittkowskiMS opened this issue Aug 12, 2024 · 3 comments
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@SchittkowskiMS
Copy link

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

  1. Create new Maui-App
  2. Add TriggerAction class for some control that generates console output when invoke is called. For example for the Editor control
  3. 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.
  4. Add control to MainPage.xaml
  5. Start application on any platform and focus the control on the MainPage
  6. 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

@SchittkowskiMS SchittkowskiMS added the t/bug Something isn't working label Aug 12, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Aug 12, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.11.0 Preview 7.0(8.0.80 & 8.0.71). Can repro on Windows and Android and iOS platform.

@samhouts samhouts added the area-xaml XAML, CSS, Triggers, Behaviors label Aug 27, 2024
StephaneDelcroix added a commit that referenced this issue Oct 10, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Oct 15, 2024
github-actions bot pushed a commit that referenced this issue Oct 15, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152
PureWeen pushed a commit that referenced this issue Oct 16, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152
github-actions bot pushed a commit that referenced this issue Oct 17, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152
github-actions bot pushed a commit that referenced this issue Oct 17, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152
github-actions bot pushed a commit that referenced this issue Oct 18, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152
@SchittkowskiMS
Copy link
Author

@jsuarezruiz why was this moved to the backlog? i feel like this is some core functionality that should work as soon as possible

PureWeen pushed a commit that referenced this issue Oct 18, 2024
Change the heuristic for deciding if we need ot ignore parent DataType,
as DataTrigger.Binding shoud inherit it, and
Picker.ItemDisplayNameBinding should not

this is an alternate fix for #23989, partially replaces #24513, and will
help fixing #25141 together with #24152

Co-authored-by: Stephane Delcroix <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants