<%--NAME:WPF dependency property author:dxqdescription: Generate WPF dependency property--%><%@ Template language= "C #" targetlanguage= " Text "%><%@ Property name=" PropertyName "default=" PropertyName "type=" System.String "description=" attribute name "%> <%@ Property Name= "PropertyType" default= "Object" type= "System.String" description= "attribute type"%><%@ Properties Nam E= "ClassName" default= "ClassName" type= "System.String" description= "class name"%>///<summary>///dependency property TODO: Add comment/ </summary>public static readonly DependencyProperty <% = PropertyName%>property = Dependencyproperty.register ("<% = PropertyName%>", typeof (<% = PropertyType%>), typeof (<% = ClassName%& gt;), null);///<summary>///dependency property TODO: Add comment///</summary>public <% = PropertyType%> <% = Propertynam E%>{get{return (<% = PropertyType%>) GetValue (<% = PropertyName%>property); } set{SetValue (<% = PropertyName%>PROperty,value); }}
[Codesmith] WPF dependency Property Script