dotnet / dotnet/wpf

An implicit style located in merged resource dictionary is not applied to the first control of the target type if the main resource dictionary is empty

Open
#2,286 2 comments 0 reactions 0 assignees View on GitHub
.NET Framework Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: 3.0
* Windows version: Version 1903
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

**Problem description:**
Hello,

Please try the following setup:

```






<Setter Property="Text" Value="Test" />





```

**Actual behavior:**
The first TextBlock there does not have its Text set to "Test". If I uncomment the DummyString resource it works as expected.

**Expected behavior:**
The first TextBlock there has its Text set to "Test".

**Minimal repro:**
See https://github.com/Proxaaa/MergeTest/tree/master

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.