Class AttachedPropertyAttribute
- Namespace
- Icy.Data.Markup.Attributes
- Assembly
- IcyUI.dll
Specifies that a class contains attached property accessors. This attribute allows the registration of attached properties by providing the names of the getter and setter methods.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class AttachedPropertyAttribute : Attribute
- Inheritance
-
AttachedPropertyAttribute
- Inherited Members
- Extension Methods
Remarks
The AttachedPropertyAttribute can be applied to a class that defines static methods for getting and setting attached properties. The attribute requires the names of the getter and setter methods, which will be used during the property registration process.
Constructors
AttachedPropertyAttribute(string, string)
Initializes a new instance of the AttachedPropertyAttribute class.
public AttachedPropertyAttribute(string getterName, string setterName)
Parameters
getterNamestringThe name of the static method that gets the attached property value.
setterNamestringThe name of the static method that sets the attached property value.
Properties
GetterName
Gets the name of the static method that gets the attached property value.
public string GetterName { get; }
Property Value
PropertyName
Gets or sets the name of the attached property.
public string? PropertyName { get; set; }
Property Value
Remarks
This property can be used to specify a custom name for the attached property that may differ from the method names.
SetterName
Gets the name of the static method that sets the attached property value.
public string SetterName { get; }
Property Value
ValidationCallback
Gets or sets the name of the callback function for property validation.
public string? ValidationCallback { get; set; }