dotnet / dotnet/wpf

make XmlnsDefinition work on the local assembly

Open
#4,876 0 comments 2 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

The problem seems to be described pretty well here:

https://stackoverflow.com/a/2778489/3195477

> If I have a XAML file in the same assembly as the types that are in the namespace I'm referencing from XmlnsDefinition, then the compiler gives an error about the type not existing in the xmlns I am defining.
>
> Moving the type to a foreign assembly fixes the problem.

It would be extremely convenient to use XmlnsDefinition on an assembly and have it be used from within that same assembly in XAML.

Also , the current limitation seems like it forces unrelated concepts about assemblies into the XAML coding, and that just seems to be confusing (judging by the # of votes etc. on that SO post).

Personally I wouldn't mind if there were some alternative way of specifying XMLNS definitions other than the attribute if the same attribute syntax could not practically be used from within the assembly.

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.