Здравствуйте, AndrewVK, Вы писали:
N>>А как определяется наличие раскрывающегося списка внутри PropertyGrid'a, в котором отображаются элементы массива?
AVK>GetProperties конвертера.
определил методы GetProperties и GetPropertiesSupported, но они даже не вызываются. В чем может быть проблема?
К строке приводится нормально.
Public Class StringArrayTypeConverter
Inherits System.ComponentModel.TypeConverter
Public Overloads Overrides Function CanConvertFrom(ByVal context As ITypeDescriptorContext, ByVal sourceType As
...
End Function
Public Overloads Overrides Function ConvertFrom(ByVal context As ITypeDescriptorContext, ByVal culture As CultureInfo, ByVal value As Object) As Object
...
End Function
Public Overloads Overrides Function ConvertTo(ByVal context As ITypeDescriptorContext, ByVal culture As CultureInfo, ByVal value As Object, ByVal destinationType As Type) As Object
...
End Function
Public Overloads Function GetPropertiesSupported() As Boolean
Return True
End Function
Public Overloads Function GetPropertiesSupported(ByVal ITypeDescriptorContext) As Boolean
Return True
End Function
Public Overloads Function GetProperties(ByVal Value As Object) As PropertyDescriptorCollection
...
End Function
End Class