HandyOrg / HandyOrg/HandyControl
ContextMenuToggleButton sometimes need two clicks to open the menu
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
If you click on a blank position or MenuItem, you need to click twice on the ContextMenuToggleButton to open the menu next time.
Steps to reproduce the bug
<StatusBarItem>
<hc:ContextMenuToggleButton Content="Click Me">
<hc:ContextMenuToggleButton.Menu>
<ContextMenu>
<MenuItem Header="test" />
</ContextMenu>
</hc:ContextMenuToggleButton.Menu>
</hc:ContextMenuToggleButton>
</StatusBarItem>
Expected behavior
The ContextMenuToggleButton toggles the opening menu correctly in all cases.
Screenshots
No response
NuGet package version
HandyControl 3.4.0
IDE
Visual Studio 2022
Framework type
.Net 6.0
Windows version
Windows 11 (22000)
Additional context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ContextMenuToggleButton implementation and reproducing the issue with the provided XAML in a .NET 6 WPF application. Check the behavior after clicking a blank position or MenuItem, then verify that the menu opens on the first subsequent click in each case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100