Skip to content

Fluent2 ContextMenu Won't Vertically Scroll #9989

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

Closed
robert-abeo opened this issue Oct 23, 2024 · 1 comment · Fixed by #10239
Closed

Fluent2 ContextMenu Won't Vertically Scroll #9989

robert-abeo opened this issue Oct 23, 2024 · 1 comment · Fixed by #10239

Comments

@robert-abeo
Copy link

Description

The Fluent2 ContextMenu doesn't support scrolling which is a mistake in the control template:

<StackPanel
ClipToBounds="True"
IsItemsHost="True"
KeyboardNavigation.DirectionalNavigation="Cycle"
Orientation="Vertical" />

Compare this to the MenuItem which is correct:

<ScrollViewer CanContentScroll="True" Style="{StaticResource MenuItemScrollViewerStyle}">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
</ScrollViewer>

The fix is simply:

                        <!-- Modified to support scrolling -->
                        <ScrollViewer
                            CanContentScroll="True"
                            HorizontalScrollBarVisibility="Disabled"
                            VerticalScrollBarVisibility="Auto">
                            <StackPanel
                                Orientation="Vertical"
                                ClipToBounds="True"
                                IsItemsHost="True"
                                KeyboardNavigation.DirectionalNavigation="Cycle" />
                        </ScrollViewer>

Reproduction Steps

See above

Expected behavior

Vertical scrolling is supported

Actual behavior

No vertical scrolling

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

@dipeshmsft
Copy link
Member

@robert-abeo, we are really grateful that you are giving the new Fluent styles a try and finding out issues in the templates. We will keep working iteratively for fixing the issues. We have worked on some of your issues and raised PR ( #9958 ) to fix it and will keep working on rest of the issues as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: ☑ Done
Development

Successfully merging a pull request may close this issue.

3 participants