Alex Rivera | Logout

XML Documentation for dependency properties

Asked 2010-10-29T16:46:02.600
9

What is the best way to document a dependency property?

Should I put the xml documentation on the field:

/// <summary>Documentation goes here</summary>
public static readonly DependencyProperty NameProperty = 
        DependencyProperty.Register(...)

or on the property:

/// <summary>and/or here?</summary>
public string Name{ get{...} set{...} }

or do I really need to document (and maintain) both?

Edit
Report

1 Answer

1

You should document and maintain both. One is the dependency property, the other is a regular property that just happens to be implemented as accessing that dependency property. They are not the same thing and require separate documentation.

answered 2010-10-29T16:48:42.687

Your Answer