lepoco / lepoco/wpfui

ContextMenu style lacks drop shadow

Open
#712 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The default style for <ContextMenu> doesn't seem to set a drop shadow (or any other kind of border). However, the style for subseqent submenus does.

To Reproduce

(I think this is clear from the screenshots.)

Expected behavior

The visual style should match other menus

Screenshots

Notice no drop shadow around the menu items:

image

Whereas submenus show one that seems almost too strong?

image

OS version

Windows 11 22H2 23506.1000

.NET version

Framework 4.7.2

WPF-UI NuGet version

2.0.3

Additional context

I skimmed the style files, and notice that

  • Menu.xaml sets a drop shadow
  • ContextMenu.xaml sets a property HasDropShadow to false (not sure why, and it seems to have no effect), and also doesn't set one either way

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the styles in Menu.xaml and ContextMenu.xaml, focusing on the existing drop-shadow settings and the HasDropShadow property. Done means the default ContextMenu has a visual border or shadow consistent with other menus, without making submenu shadows inconsistent.

Written by the indexing model from the issue text.

Assessment

Domain
design, desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.