DependencyProperty
The DependencyProperty
can be applied to a property to turn it into a Dependency Property property for use with WPF Bindings. The aspect alleviates a lot of the boilerplate code needed by providing implementations under the hood, including the getter and setter code and the static DependencyProperty
instance.
Parameters
An optional Default
value can be provided.
[DependencyProperty(Default = "Hello")]
property Caption: String;
[DependencyProperty(Default = "Hello")]
public string Caption { get; set; }
@DependencyProperty(Default = "Hello")
var Caption: String
@#DependencyProperty(Default = "Hello")
public String Caption { __get; __set; }
.NET Only
The DependencyProperty aspect is available on the .NET platform only.
Defined in RemObjects.Elements.Cirrus.dll.
See Also
- Dependency properties overview (Microsoft Docs)
- How to: Implement a Dependency Property (Microsoft Docs)