Fluent.Ribbon icon indicating copy to clipboard operation
Fluent.Ribbon copied to clipboard

Empty ContextMenu shown when ribbon controls are used outside of Ribbon

Open ychumpov opened this issue 2 years ago • 5 comments
trafficstars

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

ychumpov avatar Apr 10 '23 21:04 ychumpov

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 avatar Apr 11 '23 17:04 batzen

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

FluentContextMenuExample.zip

ychumpov avatar May 02 '23 19:05 ychumpov

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 avatar May 03 '23 16:05 batzen

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

ychumpov avatar May 04 '23 07:05 ychumpov

Not as far as I know.

batzen avatar May 04 '23 20:05 batzen