Skip to content

Fluent2 Menu/MenuItem Resource Keys Misnamed #9987

Closed
@robert-abeo

Description

@robert-abeo

Description

Every Fluent2 control template I've looked at has some very serious issues with resource keys. They don't follow upstream Fluent at all. The original author of this theme just did what they thought best but came up with a far inferior design. I have major concerns launching the Fluent2 theme like this. I think it needs to be re-written following upstream resources...

A good example of this is the Menu/MenuItem resource keys:

<!-- Menu -->
<SolidColorBrush x:Key="MenuBarBackground" Color="{StaticResource SubtleFillColorTransparent}" />
<SolidColorBrush x:Key="MenuBarForeground" Color="{StaticResource TextFillColorPrimary}" />
<SolidColorBrush x:Key="MenuBarItemBackgroundSelected" Color="{StaticResource SubtleFillColorTertiary}" />
<SolidColorBrush x:Key="MenuBarItemBorderBrush" Color="{StaticResource ControlAltFillColorTertiary}" />
<SolidColorBrush x:Key="MenuBarItemBackgroundMousePointer" Color="{StaticResource SubtleFillColorTertiary}" />

What is MenuBarItemBackgroundMousePointer. I think this should be MenuBarItemBackgroundPointerOver matching everywhere else. But there are so many resources missing here based on upstream. It forces re-templating most of the time. It is also incompatible with existing Fluent themes that define these resources.

https://github.com/microsoft/microsoft-ui-xaml/blob/d74a0332cf0d5e58f12eddce1070fa7a79b4c2db/src/controls/dev/MenuBar/MenuBar_themeresources.xaml#L5-L15

If you notice the MenuBarItemBackgroundMousePointer is also flat wrong as it should be pointing to the secondary instead of tertiary brush...

Reproduction Steps

See above

Expected behavior

See above

Actual behavior

See above

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ☑ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions