Version

ValueConstraint Class Members

The following tables list the members exposed by ValueConstraint.

Public Constructors
 NameDescription
Public ConstructorValueConstraint ConstructorCreates a new instance of ValueConstraint class without any constraints.  
Public Fields
 NameDescription
Public Fieldstatic (Shared in Visual Basic)EnumerationPropertyIdentifies the Enumeration dependency property  
Public Fieldstatic (Shared in Visual Basic)FixedValuePropertyIdentifies the FixedValue dependency property  
Public Fieldstatic (Shared in Visual Basic)MaxExclusivePropertyIdentifies the MaxExclusive dependency property  
Public Fieldstatic (Shared in Visual Basic)MaxInclusivePropertyIdentifies the MaxInclusive dependency property  
Public Fieldstatic (Shared in Visual Basic)MaxLengthPropertyIdentifies the MaxLength dependency property  
Public Fieldstatic (Shared in Visual Basic)MinExclusivePropertyIdentifies the MinExclusive dependency property  
Public Fieldstatic (Shared in Visual Basic)MinInclusivePropertyIdentifies the MinInclusive dependency property  
Public Fieldstatic (Shared in Visual Basic)MinLengthPropertyIdentifies the MinLength dependency property  
Public Fieldstatic (Shared in Visual Basic)NullablePropertyIdentifies the Nullable dependency property  
Public Fieldstatic (Shared in Visual Basic)RegexPatternPropertyIdentifies the RegexPattern dependency property  
Public Fieldstatic (Shared in Visual Basic)ValidateAsTypePropertyIdentifies the ValidateAsType dependency property.  
Public Properties
 NameDescription
Public PropertyCanFreezeGets a value that indicates whether the object can be made unmodifiable. (Inherited from System.Windows.Freezable)
Public PropertyDependencyObjectTypeGets the System.Windows.DependencyObjectType that wraps the CLR type of this instance. (Inherited from System.Windows.DependencyObject)
Public PropertyDispatcherGets the System.Windows.Threading.Dispatcher this System.Windows.Threading.DispatcherObject is associated with. (Inherited from System.Windows.Threading.DispatcherObject)
Public PropertyEnumerationGets/sets an object implementing System.Collections.IEnumerable which contains a list of value options. Note, this property defaults to a null (Nothing) value.  
Public PropertyFixedValueGets/sets the value which the constrained value must be equal to.  
Public PropertyHasAnyConstraintsReturns true if any of the constraint properties are set on this object or if the ValidateAsType property is set to something other than 'Unknown'.  
Public PropertyHasEnumerationReturns true if the Enumeration list is not null.  
Public PropertyHasFixedValueReturns true if the FixedValue property is not null (Nothing).  
Public PropertyHasMaxExclusiveReturns true if the MaxExclusive property is not null (Nothing).  
Public PropertyHasMaxInclusiveReturns true if the MaxInclusive property is not null (Nothing).  
Public PropertyHasMaxLengthReturns true if the MaxLength property has a value greater than 0.  
Public PropertyHasMinExclusiveReturns true if the MinExclusive property is not null (Nothing).  
Public PropertyHasMinInclusiveReturns true if the MinInclusive property is not null (Nothing).  
Public PropertyHasMinLengthReturns true if the MinLength property has a value greater than 0.  
Public PropertyHasNullableReturns true if the Nullable property returns a non-default value.  
Public PropertyHasRegexPatternReturns true if the RegexPattern is not null (Nothing).  
Public PropertyIsFrozenGets a value that indicates whether the object is currently modifiable. (Inherited from System.Windows.Freezable)
Public PropertyIsSealedGets a value that indicates whether this instance is currently sealed (read-only). (Inherited from System.Windows.DependencyObject)
Public PropertyMaxExclusiveGets/sets the value that will constraint the data value to be less than it.  
Public PropertyMaxInclusiveGets/sets the maximum value which the constrained value is allowed to be.  
Public PropertyMaxLengthGets/sets the maximum length (inclusive) allowed for the constrained value. This constraint applies to values of type 'string'. The default value is 0, which means that there is no limit.  
Public PropertyMinExclusiveGets/sets the value that will constraint the data value to be greater than it.  
Public PropertyMinInclusiveGets/sets the minimum value which the constrained value is allowed to be.  
Public PropertyMinLengthGets/sets the minimum length (inclusive) allowed for the constrained value. This constraint applies to values of type 'string'. The default value is 0, which means there is no minimum length constraint.  
Public PropertyNullableGets/sets a flag which indicates if the constrained value is allowed to be null (Nothing). Default value of this property is null which is to allow null values.  
Public PropertyRegexPatternGets/sets the regular expression to which the constrained value must adhere.  
Public PropertyValidateAsTypeGets/sets the ValidateAsType value which the Validate(Object,Type) method should use to constrain the input value. By default this value is set to Unknown.  
Public Methods
 NameDescription
Public MethodClearValueOverloaded. Clears the local value of a property. The property to be cleared is specified by a System.Windows.DependencyProperty identifier. (Inherited from System.Windows.DependencyObject)
Public MethodCloneCreates a modifiable clone of the System.Windows.Freezable, making deep copies of the object's values. When copying the object's dependency properties, this method copies expressions (which might no longer resolve) but not animations or their current values. (Inherited from System.Windows.Freezable)
Public MethodCloneCurrentValueCreates a modifiable clone (deep copy) of the System.Windows.Freezable using its current values. (Inherited from System.Windows.Freezable)
Public MethodCoerceValueCoerces the value of the specified dependency property. This is accomplished by invoking any System.Windows.CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling System.Windows.DependencyObject. (Inherited from System.Windows.DependencyObject)
Public MethodEquals (Inherited from System.Windows.DependencyObject)
Public MethodFreezeMakes the current object unmodifiable and sets its System.Windows.Freezable.IsFrozen property to true. (Inherited from System.Windows.Freezable)
Public MethodGetAsFrozenCreates a frozen copy of the System.Windows.Freezable, using base (non-animated) property values. Because the copy is frozen, any frozen sub-objects are copied by reference. (Inherited from System.Windows.Freezable)
Public MethodGetCurrentValueAsFrozenCreates a frozen copy of the System.Windows.Freezable using current property values. Because the copy is frozen, any frozen sub-objects are copied by reference. (Inherited from System.Windows.Freezable)
Public MethodGetHashCodeGets a hash code for this System.Windows.DependencyObject. (Inherited from System.Windows.DependencyObject)
Public MethodGetLocalValueEnumeratorCreates a specialized enumerator for determining which dependency properties have locally set values on this System.Windows.DependencyObject. (Inherited from System.Windows.DependencyObject)
Public Methodstatic (Shared in Visual Basic)GetTypeFromValidateAsTypeReturns the System.Type object which corresponds to the ValidateAsType argument.  
Public Methodstatic (Shared in Visual Basic)GetValidateAsTypeFromTypeReturns a ValidateAsType value which represents the System.Type argument.  
Public MethodGetValueReturns the current effective value of a dependency property on this instance of a System.Windows.DependencyObject. (Inherited from System.Windows.DependencyObject)
Public MethodInitializeFromOverloaded. Copies the state of the argument into this object.  
Public MethodInvalidateProperty (Inherited from System.Windows.DependencyObject)
Public MethodMergeOverloaded. Copies constraint settings from the source ValueConstraint to the target (i.e. the instance on which this method was invoked). Only constraint settings which have default values on the target will be assigned values from the source. Only constraint settings specified by the 'constraintFlags' flags argument will be copied. Note, this method does not copy the ValidateAsType property.  
Public MethodReadLocalValueReturns the local value of a dependency property, if it exists. (Inherited from System.Windows.DependencyObject)
Public MethodResetOverloaded. Resets all of the constraint settings in this object to their initial (not set) state which are specified in the 'constraintFlags' bit flag argument. Note, this method does not reset the ValidateAsType property.  
Public MethodSetCurrentValue (Inherited from System.Windows.DependencyObject)
Public MethodSetValueOverloaded. Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from System.Windows.DependencyObject)
Public MethodValidateOverloaded. Returns true if the argument is considered valid with regards to the current constraint settings.  
Protected Methods
 NameDescription
Protected MethodCloneCoreMakes the instance a clone (deep copy) of the specified System.Windows.Freezable using base (non-animated) property values. (Inherited from System.Windows.Freezable)
Protected MethodCloneCurrentValueCoreMakes the instance a modifiable clone (deep copy) of the specified System.Windows.Freezable using current property values. (Inherited from System.Windows.Freezable)
Protected MethodCreateInstanceInitializes a new instance of the System.Windows.Freezable class. (Inherited from System.Windows.Freezable)
Protected MethodCreateInstanceCoreOverridden. Creates a new instance of ValueConstraint.  
Protected MethodFreezeCoreOverridden.   
Protected MethodGetAsFrozenCoreMakes the instance a frozen clone of the specified System.Windows.Freezable using base (non-animated) property values. (Inherited from System.Windows.Freezable)
Protected MethodGetCurrentValueAsFrozenCoreMakes the current instance a frozen clone of the specified System.Windows.Freezable. If the object has animated dependency properties, their current animated values are copied. (Inherited from System.Windows.Freezable)
Protected MethodOnChangedCalled when the current System.Windows.Freezable object is modified. (Inherited from System.Windows.Freezable)
Protected MethodOnFreezablePropertyChangedOverloaded. Ensures that appropriate context pointers are established for a System.Windows.DependencyObjectType data member that has just been set. (Inherited from System.Windows.Freezable)
Protected MethodOnPropertyChanged(DependencyPropertyChangedEventArgs)Overrides the System.Windows.DependencyObject implementation of System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs) to also invoke any System.Windows.Freezable.Changed handlers in response to a changing dependency property of type System.Windows.Freezable. (Inherited from System.Windows.Freezable)
Protected MethodReadPreambleEnsures that the System.Windows.Freezable is being accessed from a valid thread. Inheritors of System.Windows.Freezable must call this method at the beginning of any API that reads data members that are not dependency properties. (Inherited from System.Windows.Freezable)
Protected Internal MethodShouldSerializePropertyReturns a value that indicates whether serialization processes should serialize the value for the provided dependency property. (Inherited from System.Windows.DependencyObject)
Protected MethodWritePostscriptRaises the System.Windows.Freezable.Changed event for the System.Windows.Freezable and invokes its System.Windows.Freezable.OnChanged method. Classes that derive from System.Windows.Freezable should call this method at the end of any API that modifies class members that are not stored as dependency properties. (Inherited from System.Windows.Freezable)
Protected MethodWritePreambleVerifies that the System.Windows.Freezable is not frozen and that it is being accessed from a valid threading context. System.Windows.Freezable inheritors should call this method at the beginning of any API that writes to data members that are not dependency properties. (Inherited from System.Windows.Freezable)
Public Events
 NameDescription
Public EventChangedOccurs when the System.Windows.Freezable or an object it contains is modified. (Inherited from System.Windows.Freezable)
Public EventPropertyChangedRaised whenever a property's value changes.  
See Also