Open sandboxFocus

Class DependencyPropertyNamingConvention

Inheritance
DependencyPropertyNamingConvention
Namespace: Metalama.Patterns.Wpf.Configuration
Assembly: Metalama.Patterns.Wpf.dll
Syntax
[CompileTime]
public sealed record DependencyPropertyNamingConvention : ICompileTimeSerializable, IEquatable<DependencyPropertyNamingConvention>

Constructors

Name Description
DependencyPropertyNamingConvention(string)

Properties

Name Description
IsOnPropertyChangedRequired

Gets or sets a value indicating whether the OnChanged method is required. The default value of this property is true if a value is provided for OnPropertyChangedPattern, otherwise false.

IsValidateRequired

Gets or sets a value indicating whether the Validate method is required. The default value of this property is true if a value is provided for ValidatePattern, otherwise false.

Name
OnPropertyChangedPattern

Gets or sets a regular expression pattern used to identify a method invoked after the property has changed. All occurrences of the substring {PropertyName} will be replaced with the name determined according to PropertyNamePattern before the expression is evaluated. The default value is On{PropertyName}Changed.

PropertyNamePattern

Gets or sets the regular expression pattern that will be evaluated against the name of the target property of the DependencyPropertyAttribute aspect. The expression should yield a match group named Name. If PropertyNamePattern is not specified, the name of the target property is used as the name of the dependency property.

RegistrationFieldName

Gets or sets the name of the registration field to be introduced. The substring {PropertyName} will be replaced with the name as determined according to PropertyNamePattern. The default value is {PropertyName}Property.

ValidatePattern

Gets or sets a regular expression used to identify the method called before the property is changed to perform validation. All occurrences of the substring {PropertyName} will be replaced with the name determined according to PropertyNamePattern before the expression is evaluated. The default value is ^Validate{PropertyName}$.

Methods

Name Description
Equals(DependencyPropertyNamingConvention?)
Equals(object?)
GetHashCode()
ToString()

Operators

Name Description
operator ==(DependencyPropertyNamingConvention?, DependencyPropertyNamingConvention?)
operator !=(DependencyPropertyNamingConvention?, DependencyPropertyNamingConvention?)