This documentation is archived and is not being maintained.

ReferenceConverter.IsValueAllowed Method

Returns a value indicating whether a particular value can be added to the standard values collection.

[Visual Basic]
Protected Overridable Function IsValueAllowed( _
   ByVal context As ITypeDescriptorContext, _
   ByVal value As Object _
) As Boolean
protected virtual bool IsValueAllowed(
 ITypeDescriptorContext context,
 object value
protected: virtual bool IsValueAllowed(
 ITypeDescriptorContext* context,
 Object* value
protected function IsValueAllowed(
   context : ITypeDescriptorContext,
 value : Object
) : Boolean;


An ITypeDescriptorContext that provides an additional context.
The value to check.

Return Value

true if the value is allowed and can be added to the standard values collection; false if the value cannot be added to the standard values collection.


This method is called for each value that matches the type associated with this ReferenceConverter and for each component found that is of the associated type. By default, this method returns true, that is, it allows adding the value into the standard values collection.

Notes to Inheritors:  Override this method when you do not want to add a value to the standard values collection.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ReferenceConverter Class | ReferenceConverter Members | System.ComponentModel Namespace | TypeConverter.StandardValuesCollection