Hello.
I'm facing the exact problem described here:
http://groups.google.com/groups?hl=p...ties%26meta%3D
I made a ExpandableObjec tConverter subclass but its GetProperties method is
not called when my object is set as a Converter of PropertyDescrip tor. The
thread above gives a good explanation of the problem, but the solution is
not described there!
Does anyone have an idea.
Bellow is the code of my derived class. If I try to use 'override' on
GetProperties declarations, the compiler says there's not a compatible
declaration on base class.
#pragma once
using namespace System;
using namespace System::Compone ntModel;
using namespace System::Collect ions;
using namespace System::Diagnos tics;
public ref class TExpandableProp erty : public ExpandableObjec tConverter
{
public:
TExpandableProp erty();
virtual PropertyDescrip torCollection^
GetProperties(I TypeDescriptorC ontext^, Object^, Attribute^ attributes)
{return GetProperties() ;}
virtual PropertyDescrip torCollection^ GetProperties(O bject^) {return
GetProperties() ;}
virtual PropertyDescrip torCollection^
GetProperties(I TypeDescriptorC ontext^, Object^) {return GetProperties() ;}
virtual PropertyDescrip torCollection^ GetProperties() ;
virtual bool GetPropertiesSu pported(ITypeDe scriptorContext ^) override
{return GetPropertiesSu pported();}
bool GetPropertiesSu pported() {return true;}
bool AddProperty(Pro pertyDescriptor ^propertyDescri ptor);
property bool ReverseProperti es {
void set(bool newValue){rever seProperties=ne wValue;}
}
protected:
private:
PropertyDescrip torCollection ^propertyCollec tion;
PropertyDescrip torCollection
^ReversePropert yDescriptorColl ection(Property DescriptorColle ction^
propertyDescrip torCollection);
bool reverseProperti es;
};
Thanks in advance for any help.
Regards,
Adriano Coser
AltoQi - Tecnologia Aplicada à Engenharia Adriano Coser Departamento de
Desenvolvimento Tel.: (48) 239-7000 ramal: 7069 e-mail: co***@altoqi.co m.br
website: www.altoqi.com.br