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

[Windows] Fix for issues caused by setting Shell.FlyoutWidth on WinUI when binding context values are changed #27151

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Tamilarasan-Paranthaman
Copy link
Contributor

Root Cause of the issue

  • The base.ArrangeOverride was not being called, which caused layout inconsistencies, such as disappearing text during runtime updates or pressing the Alt key. This occurred because the internal arrangement logic provided by the base implementation was skipped, leading to incomplete layout updates.

Description of Change

  • Added a call to base.ArrangeOverride(finalSize) to ensure that the internal layout logic provided by the base class is executed before applying custom arrangement logic. Updated the ArrangeOverride implementation to handle both the base arrangement and the custom layout logic for the _content element effectively. Ensured that the method consistently returns finalSize to confirm that the allocated size has been fully used, maintaining alignment with the layout system.

Issues Fixed

Fixes #19496
Fixes #23214

Tested the behaviour in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
Before-Fix-FL-Width.mp4
After-Fix-FL-Width.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 15, 2025
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 15, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -128,13 +128,14 @@ void ShellElementPropertyChanged(object sender, PropertyChangedEventArgs e)

protected override global::Windows.Foundation.Size ArrangeOverride(global::Windows.Foundation.Size finalSize)
{
base.ArrangeOverride(finalSize);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could include an UITest and use get the Label counter value to validate it with an Assert?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsuarezruiz, ensuring this through an assert was not functioning properly in this scenario, possibly because the text only disappeared from the view. As a result, the test passed without this fix. I have added a UI test with VerifyScreenshot to address the issue. Could you please review it and share your feedback?

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
3 participants