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

Empty ContextMenu shown when ribbon controls are used outside of Ribbon #1123

Open
ychumpov opened this issue Apr 10, 2023 · 5 comments
Open
Labels
Milestone

Comments

@ychumpov
Copy link

ychumpov commented Apr 10, 2023

I noticed that when I click on split button with right click, the follow small square appears:

image

Is this by design or it is a bug?

Here is the actual xaml:

<fluent:SplitButton Grid.Row="3"
                                Header="Test"
                                HorizontalAlignment="Center">
                <fluent:MenuItem Header="Name">
                    <fluent:MenuItem.ContextMenu>
                        <fluent:ContextMenu>
                            <fluent:MenuItem Header="Menu Item"
                                      Background="Transparent"/>
                        </fluent:ContextMenu>
                    </fluent:MenuItem.ContextMenu>
                </fluent:MenuItem>
                <fluent:MenuItem Header="Family"/>
            </fluent:SplitButton>

Environment

  • Fluent.Ribbon v9.0.4
  • Windows 10
  • .NET Framework 4.8
@batzen
Copy link
Member

batzen commented Apr 11, 2023

Could you try this with the current preview version of version 10?
I can't reproduce your issue using that version.
Haven't tried version 9.

If it also happens with version 10 it would be nice if you could attach a small repro project.

@batzen batzen added the Waiting for user response 😕 Waiting for the reporter to respond to questions made by maintainer. label Apr 30, 2023
@ychumpov
Copy link
Author

ychumpov commented May 2, 2023

Confirm the small square is still shown on the right click in version - 10.0.0-alpha0256.
Here is demo project.

FluentContextMenuExample.zip

@batzen batzen removed the Waiting for user response 😕 Waiting for the reporter to respond to questions made by maintainer. label May 3, 2023
@batzen
Copy link
Member

batzen commented May 3, 2023

Ah, you are trying to use the control outside of a Ribbon.

The context menu code to support the same context menu on every ribbon control is quite complicated and the way it works leads to an empty context menu if controls meant to be used in the ribbon are used outside of a ribbon.

I am not sure when and if I will ever fix this.
Maybe I have a bright moment and find a solution some day.

@batzen batzen added the Bug 🐞 label May 3, 2023
@ychumpov
Copy link
Author

ychumpov commented May 4, 2023

Beyond this bug, are there any other issues if I use fluent controls like drop down button and split button outside the ribbon?

@batzen
Copy link
Member

batzen commented May 4, 2023

Not as far as I know.

@batzen batzen changed the title Strange square on the SplitButton rigth click Empty ContextMenu shown when ribbon controls are used outside of Ribbon May 4, 2023
@batzen batzen added this to the Future milestone May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants