lepoco / lepoco/wpfui

Type or namespace name 'Ui' does not exist in the namespace when I set a name to a wpf-ui component in xaml

Open
#1,144 12 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

Hi, I'm using wpf-ui on my wpf app. It's working, but when I write x:name or name to a component in the xaml it gives me the following error:
The type or namespace name 'Ui' does not exist in the namespace 'Client.Wpf' (are you missing an assembly reference?)
If I cancel the name or x:name the error will go away.

To Reproduce

Set name or x:name to a wpf-ui component.

Expected behavior

x:name in wpf-ui component working

Screenshots

No response

OS version

Windows 11

.NET version

8.0

WPF-UI NuGet version

3.0.4

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

Reproduce the issue in a Windows 11 WPF app using .NET 8 and WPF-UI NuGet 3.0.4, first setting x:Name or Name on a WPF-UI component. Trace why that declaration produces the Client.Wpf.Ui namespace error; done means named WPF-UI components compile without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.