wpf icon indicating copy to clipboard operation
wpf copied to clipboard

RibbonWindow not working correctly with ThemeMode="System"

Open dha125 opened this issue 10 months ago • 2 comments

Description

RibbonWindow fails to correctly render if ThemeMode="System" is in either App.xaml or MainWindow.xaml. RibbonWindow and Ribbon are well written but seem to have missed the modernization in dotnet 9.

Reproduction Steps

Any valid RibbonWindow fails to render the quick access toolbar in the window title bar in a net9.0-windows or net10.0-windows project if any ThemeMode is set. I'm currently testing with 10.0.100-preview.2.25164.34.

<RibbonWindow x:Class="WpfRibbonApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfRibbonApp" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800" ThemeMode="System"> <DockPanel> <Ribbon DockPanel.Dock="Top"> </Ribbon> <StackPanel> </StackPanel> </DockPanel> </RibbonWindow>

Expected behavior

Quick access toolbar in the window title bar. Image

Actual behavior

See image in expected behavior.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

dha125 avatar Apr 11 '25 15:04 dha125

@dha125, the actual issue here is that Ribbon and associated controls are not styled according to Fluent. Currently we have the styles for controls in PresentationFramework assembly.

dipeshmsft avatar Apr 16 '25 09:04 dipeshmsft

Thanks for the feedback. Will the Ribbon be modernized for the final dotnet 10 release?

dha125 avatar Apr 16 '25 18:04 dha125