ReferenceConverter.IsValueAllowed(ITypeDescriptorContext, Object) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value indicating whether a particular value can be added to the standard values collection.
protected:
virtual bool IsValueAllowed(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value);
protected virtual bool IsValueAllowed(System.ComponentModel.ITypeDescriptorContext context, object value);
abstract member IsValueAllowed : System.ComponentModel.ITypeDescriptorContext * obj -> bool
override this.IsValueAllowed : System.ComponentModel.ITypeDescriptorContext * obj -> bool
Protected Overridable Function IsValueAllowed (context As ITypeDescriptorContext, value As Object) As Boolean
- context
- ITypeDescriptorContext
An ITypeDescriptorContext that provides an additional context.
- value
- Object
The value to check.
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.
Override this method when you do not want to add a value to the standard values collection.
Produkt | Versioner |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Feedback om .NET
.NET är ett öppen källkod projekt. Välj en länk för att ge feedback: