Closed ForNeVeR closed 4 years ago
I see,
Actually, you can omit xmlns="..."
if you want to use classes from default namespace ConsoleFramework.Controls
.
And while it doesn't work with xmlns=
you can insert
xmlns="clr-namespace:ConsoleFramework.Controls;assembly=ConsoleFramework"
to get XAML editor working
and remove it when starting app.
This is the only workaround for now :-(
Actually, you can omit
xmlns="..."
if you want to use classes from default namespaceConsoleFramework.Controls
.
Yes, but it requires to pass all the "default" namespaces to XamlParser.CreateFromXaml
, like it is done here in the framework code: https://github.com/elw00d/consoleframework/blob/87ae9a527fb3e1dee7d1a52338909d4429c5c5ac/ConsoleFramework/ConsoleApplication.cs#L191-L196
I don't use this approach because the editor doesn't know about namespaces passed this way, and I want to utilize my editor tooling as much as possible.
And while it doesn't work with
xmlns=
you can insertxmlns="clr-namespace:ConsoleFramework.Controls;assembly=ConsoleFramework"
to get XAML editor working
and remove it when starting app.
This is the only workaround for now :-(
As a workaround, I ended up just using the namespaced variant everywhere, which works equally well.
I think it is fixed now, please give a try )
To simplify compatibility with existing XAML tooling (e.g. Rider XAML editor), I'd like to set my namespaces in the XAML file itself, for example:
But this doesn't work: when I try to load this file, it throws an exception:
I think that ConsoleFramework's XAML reader should respect well-known XML
xmlns=""
idiom.