Implementing Attached Properties in C++
Posted: 10 Aug 2017, 11:00
Hi, I am trying to translate the following WPF attached properties using Noesis C++ SDK. (The original code is here: http://www.mobilemotion.eu/?p=1822)
But I am not sure the correct way to do it.
# Sorry to attached the code by image. The forum refused to work when I submitted the data using 'code' or 'quote' tags.
For example, when registering the reflection for Command property, should I use data->RegisterProperty<ICommand>, or data->RegisterProperty<Ptr<ICommand>> or maybe data->RegisterProperty<Ptr<BaseCommand>> ?
Similarly, when registering the reflection for Event property, should I use data->RegisterProperty<NsString> ? Compiler complains with ambiguous == operator when I did this.
Could you please post the correct C++ code for this ?
But I am not sure the correct way to do it.
# Sorry to attached the code by image. The forum refused to work when I submitted the data using 'code' or 'quote' tags.
For example, when registering the reflection for Command property, should I use data->RegisterProperty<ICommand>, or data->RegisterProperty<Ptr<ICommand>> or maybe data->RegisterProperty<Ptr<BaseCommand>> ?
Similarly, when registering the reflection for Event property, should I use data->RegisterProperty<NsString> ? Compiler complains with ambiguous == operator when I did this.
Could you please post the correct C++ code for this ?