Open
Description
Description
When implementing a custom NavigationDrawer using a Grid in .NET MAUI, the content of the drawer layout visibility is set to false initially, and then programmatically changed to true, causing content misalignment issues. Specifically:
- The controls inside the DrawerContent do not render properly or remain invisible.
- On runtime, updating the width, height, or any other properties of the affected controls after setting visibility to true makes them visible.
This behavior suggests a potential layout invalidation issue when toggling visibility programmatically.
Sample: DrawerCustomSample.zip
Video: Demo
Steps to Reproduce
- Run the sample mentioned in the description.
- Click the 'ToggleDrawer' button. The drawer will open with no content, as the visibility of the content is set as false initially.
- Again click the 'ToggleDrawer' button. The drawer will close.
- Click the "ChangeVisibility" button to programmatically set the DrawerContent visibility to true.
- Again click the 'ToggleDrawer' button. The drawer will open.
- Observe that the controls inside the sliding panel are either misaligned or not visible.
- Manually update any layout property (e.g., WidthRequest or HeightRequest) to force a refresh, which makes the controls render correctly.
Link to public reproduction project repository
No response
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
No response
Affected platforms
iOS, macOS
Affected platform versions
No response
Did you find any workaround?
If the DrawerContent's visibility is set to true while the drawer is open, the controls align and render correctly.
SlingPanel_Workaround.mp4
Metadata
Assignees
Labels
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterWork that is important, but is currently not scheduled for releaseIssues / PR's with Syncfusion collaborationmacOS / Mac CatalystIssue has been reviewedVerified / Reproducible Issue ready for Engineering TriageSomething isn't working
Activity