PropertyMetadata - Property Changed Callback
Posted: 25 Aug 2021, 00:19
Hi,
I have a DependencyProperty in my custom control that I am trying to register.
I want to supply the PropertyMetadata with this callback for when the property changes:
But when I compile, Noesis throws this error:
The property changed callback is the only important thing I need the metadata to have. Do I need to supply a ValueStorageManager?
Can someone share some examples of how this should look?
I'm using the Noesis 2.2 C++ SDK.
Thanks in advance :)
I have a DependencyProperty in my custom control that I am trying to register.
Code: Select all
static const DependencyProperty *SelectedItemsProperty;Code: Select all
NS_IMPLEMENT_INLINE_REFLECTION(MultiSelectTreeView, TreeView)
{
NsMeta<TypeId>("Vital.MultiSelectTreeView");
DependencyData *data = NsMeta<DependencyData>(TypeOf<SelfClass>());
data->RegisterProperty<Ptr<ObservableCollection<BaseComponent>>>(SelectedItemsProperty, "SelectedItems",
PropertyMetadata::Create(&OnSelectedItemsChanged));
}Code: Select all
void OnSelectedItemsChanged(BaseComponent *_sender, const DependencyPropertyChangedEventArgs &e);NoesisSDK_2.2.0\Include\NsCore/TypeOfBase.inl(29,49): error C2825: 'T': must be a class or namespace when followed by '::'
I've tried calling a few different overloads of PropertyMetadata::Create, but cannot get it to work.NoesisSDK_2.2.0\Include\NsGui/PropertyMetadata.inl(18): message : see reference to class template instantiation 'Noesis::ValueStorageManagerImpl<T>' being compiled
The property changed callback is the only important thing I need the metadata to have. Do I need to supply a ValueStorageManager?
Can someone share some examples of how this should look?
I'm using the Noesis 2.2 C++ SDK.
Thanks in advance :)