http://forum.strataframe.net/FindPost3479.aspx
This is what I have so far but it doesnt like boCalc.
Protected Overrides Function GetCustomBindablePropertyDescriptors() As FieldPropertyDescriptor()
Return New ReflectionPropertyDescriptor("Ctr", Type.GetType(boCalc))
End Function
Okay I figured it out.
Return New FieldPropertyDescriptor() {New ReflectionPropertyDescriptor("Ctr", GetType(boCalc))}
As for the Type.GetType(boCalc), it's a shared (static) method on the System.Type class, and it only accepts strings, but the GetType(boCalc) is a language keyword, so it accepts the type and knows how to compile it.
And you figured out the creating a new array rather than returinging only a single instance.
I tried somthing like this but doesnt work
Return New FieldPropertyDescriptor() {New ReflectionPropertyDescriptor("Ftr", GetType(boCalc))}
This:
New FieldPropertyDescriptor() { }
Tells it to create a new array of type FieldPropertyDescriptor. Whatever you put in the curly braces are items in the newly created array (ReflectionPropertyDescriptor is a subclass of FieldPropertyDescriptor). So, it needs to look like this:
Return New FieldPropertyDescriptor() { New ReflectionPropertyDescriptor("Ctr", GetType(boCalc)), _ New ReflectionPropertyDescriptor("Ftr", GetType(boCalc)) }
Any others that you add just need to be separated by commas.