Open ehsangfl opened 4 years ago
It is known that the XamlGenerator can only lookup for XmlnsDefs in project references, and not in the current one. That feature is thus targeted at 3rd party control provider, more than directly to the users.
we plan to change this, but it will require rewriting XamlG over Roslyn, or Source Generators
yes, but in sample description, base class is not defined in current assembly. base class is on Infrastructure assembly (Infrastructure,View,dll), and xmldef was added to it. and I want to use this baseview on other assembly (like Common.View.dll), with reference of Infrastructure asssembly (Infrastructure,View,dll). I think problem is on code generator of xaml. because if I replace codes handly, (implement g.cs file from baseview) , application run correctly. this means that xamldef define links correctly and code generator cannot generate .g.cs files.
Hi I defined base view
and defined custom schema
[assembly: XmlnsDefinition("http://schemas.apadanasystems.com/xaml/Views", "StandardView.Views")]
Then I created a view that implement from BaseView class and i named it "Notification". Xaml Code of "Notification" view is :
and in c# file
Unfortunately code generator for g.cs file could not find base class of xaml page. and namespace definition in xaml must be declared in explicit way as
then code generator can found xaml base class and generate the g.cs file BR