Skip to content

Fix the issue causing crashes with LayoutTransformControl in AOT publishing. - #692

Merged
Arlodotexe merged 5 commits into
CommunityToolkit:mainfrom
qian-o:fix/layouttransformcontrol
Dec 12, 2025
Merged

Fix the issue causing crashes with LayoutTransformControl in AOT publishing.#692
Arlodotexe merged 5 commits into
CommunityToolkit:mainfrom
qian-o:fix/layouttransformcontrol

Conversation

@qian-o

@qian-o qian-o commented May 26, 2025

Copy link
Copy Markdown
Contributor

Fixes #691

  1. Adjusted the use of Size.Empty in layout calculations. This property was set to negative infinity, which appeared to be the direct cause of the crash.
  2. Improved the TemplatePart attribute to ensure proper functionality after AOT publishing.

What is the current behavior?

  • After AOT publishing, LayoutTransformControl causes crashes.
  • PropertyChangeEventSource uses two-way binding between dependency properties to handle property changes.

What is the new behavior?

  • LayoutTransformControl no longer crashes after AOT publishing.
  • PropertyChangeEventSource now uses the RegisterPropertyChangedCallback method to register property change callbacks.

…y layout in layout calculations, and improve the TemplatePart attribute to ensure proper functionality after AOT publishing.
@qian-o

qian-o commented May 26, 2025

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@Arlodotexe
Arlodotexe self-requested a review June 5, 2025 16:32

@zubinqayam zubinqayam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qian-o:fix/layouttransformcontrol

Comment thread components/LayoutTransformControl/src/PropertyChangeEventSource.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WinUI3] LayoutTransformControl crashes when running in AOT mode.

3 participants