dotnet / dotnet/wpf

Style described in App.xaml is not applied to Window in Fluent System.

Open
#10,858 1 comment 0 reactions 1 assignee Claimed by @harshit7962 View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

We are testing FluentSystem, which was introduced in .NET 9.

The behavior is different when ThemeMoThde is described or not.

[FluentWPF.zip](https://github.com/user-attachments/files/20297477/FluentWPF.zip)

> When ThemeMoThde is not described

The Style described in App.xmal is applied to MainWindow and OverlayWindow.

![Image](https://github.com/user-attachments/assets/bc6bccac-6514-4168-9f1e-f3cef2fed03b)

> When ThemeMoThde is specified for System

The Style described in App.xmal is applied to MainWindow only.
The Style is not applied to OverlayWindow.
The Style of FluentSystem is applied to OverlayWindow.

![Image](https://github.com/user-attachments/assets/8d2342d9-463a-4174-8a84-b7927934ef6f)

### Reproduction Steps

Run [FluentWPF.zip](https://github.com/user-attachments/files/20297477/FluentWPF.zip), rewrite ThemeMode="System" in App.xaml and execute to confirm.

### Expected behavior

The yellow BackGround described in App.xmal seems to be the correct one

### Actual behavior

OverlayWindow described with Style that FluentSystem's Style is prioritized and adapted is adopted

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.