Open sandboxFocus

Class DependencyPropertyOptionsBuilder

Builder for configuring the DependencyPropertyAttribute aspect, allowing customization of naming conventions, read-only behavior, and default value handling.

Inheritance
DependencyPropertyOptionsBuilder
Namespace: Metalama.Patterns.Wpf.Configuration
Assembly: Metalama.Patterns.Wpf.dll
Syntax
[CompileTime]
public sealed class DependencyPropertyOptionsBuilder
Remarks

Use this builder through the DependencyPropertyExtensions.ConfigureDependencyProperty(IQuery<ICompilation>,Action<DependencyPropertyOptionsBuilder>) method and its overloads to configure dependency property options at the project, namespace, type, or property level.

Constructors

Name Description
DependencyPropertyOptionsBuilder()

Properties

Name Description
DefaultNamingConventionName

Gets the key of the default naming convention.

InitializerProvidesDefaultValue

Gets or sets a value indicating whether the property initializer (if present) should be used to for DefaultValue. The default is true.

IsReadOnly

Gets or sets a value indicating whether the property should be registered as a read-only property.

Methods

Name Description
AddNamingConvention(DependencyPropertyNamingConvention, int?)

Adds or updates a naming convention that specifies, based on the name of the target method of the DependencyProperty aspect: the name of the registration field and of the OnChanging, OnChanged and Validate methods.

RemoveNamingConvention(string)

Removes a DependencyPropertyNamingConvention.

ResetNamingConventions()

Resets naming convention registrations to the default state, removing any user-registered naming conventions.

SetNamingConventionPriority(string, int)

Changes the priority of a DependencyPropertyNamingConvention.

Extension Methods

See Also