User avatar
z0rg77
Topic Author
Posts: 15
Joined: 01 Apr 2020, 10:33
Contact:

Datatemplate's datatype c++ SDK

27 May 2020, 00:05

Hi there !

It appears to have an inconsistent behavior between the cpp SDK and the c# one.
When we use the c# SDK we have to specify the namespace for accessing a type
xmlns:namespace="clr-namespace:Buttons"
...
<DataTemplate DataType="{x:Type namespace:ProjectsPageViewModel}">
But in the c++ SDK, adding it causes noesis to not find the type. We have to remove it to make it work.
This is a bit annoying to work with because I want to maintain a blend version along the cpp version to have the designer working.

Is there a workaround ?
 
User avatar
jsantos
Site Admin
Posts: 3935
Joined: 20 Jan 2012, 17:18
Contact:

Re: Datatemplate's datatype c++ SDK

27 May 2020, 04:07

You can manually add the namespace when applying the corresponding C++ reflection macro. Our examples are already doing that:
NS_IMPLEMENT_REFLECTION_(Scoreboard::App, "Scoreboard.App")
 
User avatar
z0rg77
Topic Author
Posts: 15
Joined: 01 Apr 2020, 10:33
Contact:

Re: Datatemplate's datatype c++ SDK

27 May 2020, 09:31

I missed it, thank you !
 
User avatar
jsantos
Site Admin
Posts: 3935
Joined: 20 Jan 2012, 17:18
Contact:

Re: Datatemplate's datatype c++ SDK

28 May 2020, 11:27

You welcome! Please, keep us posted about your webpage using Noesis 😀

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 2 guests