Is there a way to make custom controls without namespace constraints? #17996
-
Custom controls are typically used:
Is there a way to use it directly
without adding namespace. I've tried putting my class directly under the namespace Avalonia.Controls, but it doesn't work. |
Beta Was this translation helpful? Give feedback.
Answered by
msneijders
Jan 18, 2025
Replies: 1 comment 1 reply
-
You can use [assembly: XmlnsDefinition("https://github.com/avaloniaui", "MySoft")] Given you have |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nasterhe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
Avalonia.Metadata.XmlnsDefinitionAttribute
. Something like this in a cs file (often called 'CommonNamespace.cs' what I have seen:Given you have
xmlns="https://github.com/avaloniaui"
marked in your xaml file.