lepoco / lepoco/wpfui

Visual Studio will not show resource names intelligence when using the new resource merging style

Open
#247 2 comments 1 reaction 1 assignee View on GitHub

@pomianowski is already working on this.

Since Jun 24, 2022.

bug enhancement
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

In the previous version 1.2.7, we merge resources using the ResourceDictionary:

<ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Styles/Theme/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Styles/Wpf.Ui.xaml" />

After upgrading the WPFUI to 2.0.1, it introduced a new style like this:

<winui:Resources Theme="Dark" />

But the Visual Studio does not recognize it so we will not get the resource names in the intelligence.

d:ResourceDictionary is not supported right now so the workaround below is invalid:

<d:ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Styles/Theme/Dark.xaml" />
<d:ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Styles/Wpf.Ui.xaml" />
<winui:Resources Theme="Dark" />

Describe the solution you'd like

Idk. Maybe we have to give up the new style?

Describe alternatives you've considered

Additional context

It now only contains the resources that are defined in my project only.

image

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.