ToolboxItem.ValidatePropertyValue(String, 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.
Validates a property before it is assigned to the property dictionary.
protected:
virtual System::Object ^ ValidatePropertyValue(System::String ^ propertyName, System::Object ^ value);
protected virtual object ValidatePropertyValue(string propertyName, object value);
protected virtual object? ValidatePropertyValue(string propertyName, object? value);
abstract member ValidatePropertyValue : string * obj -> obj
override this.ValidatePropertyValue : string * obj -> obj
Protected Overridable Function ValidatePropertyValue (propertyName As String, value As Object) As Object
- propertyName
- String
The name of the property to validate.
- value
- Object
The value against which to validate.
The value used to perform validation.
value
is null
, and propertyName
is "IsTransient".
The ValidatePropertyValue method is called whenever a value is set in the property dictionary. With this method, you can change the value of an object before committing it, or reject it by throwing an exception.
Product | Versions |
---|---|
.NET Framework | 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 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: