lepoco / lepoco/wpfui

White screen on Win10 + .NET Framework 4.8.0/4.7.2

Open
#808 3 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

A brand new project using .NET Framework 4.8.0 (or 4.7.2) shows a blank screen if <ui:ControlsDictionary /> is present.

To Reproduce

Create a brand new WPF project, set the target to .NET Framework 4.8.0, and install WPF-UI.

Define the application resources as:

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemesDictionary Theme="Dark" />
                <ui:ControlsDictionary />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

Define the root element on MainWindow.xaml as:

    <StackPanel>
        <Button Content="DEF"></Button>
        <ui:Button Content="ABC"></ui:Button>
    </StackPanel>

Run the project. It'll display a white screen:
image

If I remove the <ui:ControlsDictionary /> line from App.xaml, it shows both buttons, although without any style:
image

Expected behavior

It should display both buttons as expected, with the ui:Button one styled.

Screenshots

No response

OS version

Windows 10

.NET version

4.8.0 and 4.7.2

WPF-UI NuGet version

2.1.0

Additional context

No response

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 with the App.xaml resource declarations and MainWindow.xaml reproduction described in the issue, then run the minimal project against .NET Framework 4.8.0 and 4.7.2 with WPF-UI 2.1.0. Investigate how ui:ControlsDictionary affects resource loading; done means both buttons render on Windows 10 and the ui:Button remains styled when that dictionary is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.