AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.12k stars 2.26k forks source link

NativeControlHost Content Not Displaying After Page Transition in TransitioningContentControl on Windows #14747

Open LITTOMA opened 9 months ago

LITTOMA commented 9 months ago

Describe the bug

On the Windows platform, when using NativeControlHost inside TransitioningContentControl, the content within NativeControlHost does not display after the TransitioningContentControl switches pages. The content becomes visible only after the user manually resizes the window. Debugging reveals that the native control's position is initially set to an incorrect X coordinate, which corrects itself upon window resize, suggesting an issue with native control positioning after a page transition.

To Reproduce

Steps to reproduce the behavior:

  1. Implement TransitioningContentControl with a NativeControlHost embedded.
  2. Trigger a page transition within TransitioningContentControl.
  3. Observe that the content inside NativeControlHost does not display after the transition.
  4. Manually resize the window to see the previously invisible content appear.

Expected behavior

After a page transition in TransitioningContentControl, the content within NativeControlHost should display correctly without requiring a manual window resize.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

Additional context

Sample repo: https://github.com/LITTOMA/PageTransitionWithNativeHostWindows

LITTOMA commented 8 months ago

Hello, anyone home?

timunie commented 8 months ago

Hello, anyone home?

If you rely on free community support, it means things are getting worked on if anyone has time to work on it. If you need priority support, I recommend to reach out to the team for a support agreement. https://www.avaloniaui.net/support