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

Tooltip / Screentip appears after a menu item in a split button has been clicked #953

Closed
atlastodor opened this issue Jun 14, 2021 · 5 comments
Assignees

Comments

@atlastodor
Copy link

Given:

  • A split button with a tooltip or screentip.
  • And a menu item in that split button, which also contains a tooltip or screentip
  • And a logic (command or click handler) that opens a dialog / runs a new dispatcher loop.

When clicking on the menu item, the dialog is shown and a moment later, the tooltip for the split button is shown (overlapping whatever is on the screen)

See video: https://www.screencast.com/t/szioTWRk04Z

<Fluent:SplitButton
    Header="Action"
    Icon="{DynamicResource Fluent.Ribbon.Images.Paste}"
    LargeIcon="{DynamicResource Fluent.Ribbon.Images.Paste}">
    <Fluent:SplitButton.ToolTip>
        <Fluent:ScreenTip Text="Lorem ipsum dolor..." />
    </Fluent:SplitButton.ToolTip>
    <Fluent:MenuItem
        Command="{Binding TestCommand, ElementName=TestContentControl}"
        Header="Menu Item"
        Icon="{DynamicResource Fluent.Ribbon.Images.Paste}" 
        ToolTip="THIS MUST HAVE A TOOLTIP!"
    /> 
</Fluent:SplitButton>

Environment

  • Fluent.Ribbon Commit 8238927, but also in NuGet 8.0.3
  • Windows 10.0.19042.1052
  • .NET Framework net 5.0
@batzen
Copy link
Member

batzen commented Jun 14, 2021

@atlastodor That's not a bug in Fluent.Ribbon, but in WPF itself. Please have a look at dotnet/wpf#4613
This bug was introduced by changes made to WPF which added ToolTip opening by keyboard focus.
You can also reproduce this by switching to a regular tooltip.

@batzen batzen self-assigned this Jun 14, 2021
@atlastodor
Copy link
Author

Thanks Bastian. This is an annoying one. Do you know of any hack to work around the bug?

@batzen
Copy link
Member

batzen commented Jun 14, 2021

You can use the app context switch mentioned in dotnet/wpf#4172

@atlastodor
Copy link
Author

Danke Bastian. Close the case for now, as we can't do much. I believe we will use the app context switch to disable this "feature" in 4.8. We will be migrating to .Net 6 later this year and I cross fingers that MS will fix it. Will they accept a PR in the WPF repository, if we implement the fix?

@batzen
Copy link
Member

batzen commented Jun 16, 2021

@atlastodor I implemented a fix, proposed a PR and they rejected it because "Your solution here isn't quite flexible enough.". But they seem to plan to fix this, don't know if it will be included in .NET 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants