Accessing List of reflected properties added with NSProp
Posted: 23 Jun 2021, 15:36
Hello,
I am trying to write a generic behavior and I would need to go trough in reflected properties of ViewModel of attached control.
In this example, how can I get "Name" and "Age" property names and how can I query the value of this properties.
I wrote the similar idea with C# and it is working. When I tried the same idea with c++ BaseComponent::GetDataContext()::GetClassType(), (in this case DataContext is PersonViewModel)I do not see these properties that I added with NsProp.
I am trying to write a generic behavior and I would need to go trough in reflected properties of ViewModel of attached control.
Code: Select all
NS_IMPLEMENT_REFLECTION(PersonViewModel)
{
NSProp("Name", &PersonViewModel::GetName);
NSProp("Age", &PersonViewModel::GetAge);
}
I wrote the similar idea with C# and it is working. When I tried the same idea with c++ BaseComponent::GetDataContext()::GetClassType(), (in this case DataContext is PersonViewModel)I do not see these properties that I added with NsProp.