Skip to content

[XSG] SwipeItem.Invoked event handler not found #33877

@StephaneDelcroix

Description

@StephaneDelcroix

Note

Are you waiting for the changes in this issue to be resolved?
Please check for existing PRs addressing this issue and test them if available.

Description

XSG fails to find the Invoked event handler on SwipeItem when specified in XAML.

Reproduction

<SwipeItem Text="Delete" Invoked="OnInvoked" />

Error:

error MAUIX2002: No accessible property, BindableProperty, or event found for 'OnInvoked', or mismatching type between value and property.

Note: The error message says "OnInvoked" (the handler name) instead of "Invoked" (the event name), which may be a bug in the error message itself.

Expected Behavior

XSG should recognize Invoked as an event on SwipeItem and wire up the event handler correctly.

Affected File

src/Controls/samples/Controls.Sample/Pages/Controls/SwipeViewGalleries/CustomSwipeControl.xaml

Workaround

Use Inflator="Runtime" for the affected XAML file.

Context

Discovered while testing XSG fixes for #33524.

Metadata

Metadata

Labels

s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriagexsgXaml sourceGen

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions