Skip to content

Conversation

@devanathan-vaithiyanathan
Copy link
Contributor

Issue Details

The CollapsedPaneWidth value was not being properly applied to the native NavigationView.

Description of Change

Implemented the logic to apply CollapsedPaneWidth in the FlyoutPageHandler for Windows. Ensured that the specified CollapsedPaneWidth is mapped and assigned to the corresponding property (NavigationView.CompactPaneLength) of the native control.

Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927

Issues Fixed

Fixes #33785

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac
Before After
Windows
Before.mp4
Windows
After.mp4

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 30, 2026
@sheiksyedm
Copy link
Contributor

/azp run maui-pr-uitests 

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the FlyoutPage CollapsedPaneWidth property on Windows by implementing proper mapping from the MAUI property to the native NavigationView.CompactPaneLength property. The fix enables both initial and dynamic configuration of the collapsed pane width when using CollapseStyle.Partial.

Changes:

  • Added property change callback to trigger handler updates when CollapsedPaneWidth changes
  • Registered mapper for CollapsedPaneWidth property in FlyoutPage handler
  • Implemented mapper to apply CollapsedPaneWidth to native NavigationView.CompactPaneLength
  • Added UI test to verify CollapsedPaneWidth works both initially and when changed dynamically

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Controls/src/Core/PlatformConfiguration/WindowsSpecific/FlyoutPage.cs Added property changed callback (OnCollapsedPaneWidthChanged) to trigger handler updates when CollapsedPaneWidth property changes
src/Controls/src/Core/FlyoutPage/FlyoutPage.Mapper.cs Registered mapper for CollapsedPaneWidthProperty and implemented MapCollapsedPaneWidth to apply the value to NavigationView.CompactPaneLength
src/Controls/tests/TestCases.HostApp/Issues/Issue33785.cs Created UI test page that demonstrates CollapsedPaneWidth functionality with initial value (50) and dynamic change (100)
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33785.cs Implemented automated UI test that verifies CollapsedPaneWidth changes are applied correctly using screenshot verification

if (view is BindableObject bindable && handler.PlatformView is Microsoft.Maui.Platform.RootNavigationView navigationView)
{
var collapsedPaneWidth = PlatformConfiguration.WindowsSpecific.FlyoutPage.GetCollapsedPaneWidth(bindable);
if (collapsedPaneWidth > 0)
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The validation condition if (collapsedPaneWidth > 0) is inconsistent with the property's validation which allows values >= 0. A value of 0 is valid according to the BindableProperty definition (line 70 in FlyoutPage.cs), but this mapper would skip applying it. Consider changing the condition to >= 0 or removing it entirely since the property already validates non-negative values. The default value is 48, so the typical case of 0 would represent "use default" behavior, which should probably still be applied to the platform control.

Suggested change
if (collapsedPaneWidth > 0)
if (collapsedPaneWidth >= 0)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-flyoutpage FlyoutPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlyoutPage CollapsedPaneWidth is not working

4 participants