@@ -72,6 +72,7 @@ public override void LoadSettings()
72
72
{
73
73
_options = new CodeCommentOptions ( Settings . Default , 4 ) ;
74
74
75
+ RaisePropertyChangedForAllOptionsProperties ( ) ;
75
76
UpdatePreviewText ( ) ;
76
77
}
77
78
@@ -90,7 +91,7 @@ public override void SaveSettings()
90
91
/// <summary>
91
92
/// Gets or sets the flag indicating if comment formatting will run during cleanup.
92
93
/// </summary>
93
- public bool CommentRunDuringCleanup
94
+ public bool FormatDuringCleanup
94
95
{
95
96
get { return _options . FormatDuringCleanup ; }
96
97
set
@@ -106,7 +107,7 @@ public bool CommentRunDuringCleanup
106
107
/// <summary>
107
108
/// Gets or sets the flag indicating if comment formatting should skip wrapping the last word.
108
109
/// </summary>
109
- public bool CommentSkipWrapOnLastWord
110
+ public bool SkipWrapOnLastWord
110
111
{
111
112
get { return _options . SkipWrapOnLastWord ; }
112
113
set
@@ -122,7 +123,7 @@ public bool CommentSkipWrapOnLastWord
122
123
/// <summary>
123
124
/// Gets or sets the column where comments will attempt to wrap.
124
125
/// </summary>
125
- public int CommentWrapColumn
126
+ public int WrapAtColumn
126
127
{
127
128
get { return _options . WrapAtColumn ; }
128
129
set
@@ -139,7 +140,7 @@ public int CommentWrapColumn
139
140
/// <summary>
140
141
/// Gets or sets the flag indicating if the content of param tags should be aligned.
141
142
/// </summary>
142
- public bool CommentXmlAlignParamTags
143
+ public bool XmlAlignParamTags
143
144
{
144
145
get { return _options . XmlAlignParamTags ; }
145
146
set
@@ -155,7 +156,7 @@ public bool CommentXmlAlignParamTags
155
156
/// <summary>
156
157
/// Gets or sets the flag indicating if an extra space should be added inside XML tags.
157
158
/// </summary>
158
- public bool CommentXmlSpaceTags
159
+ public bool XmlSpaceTagContent
159
160
{
160
161
get { return _options . XmlSpaceTagContent ; }
161
162
set
@@ -171,7 +172,7 @@ public bool CommentXmlSpaceTags
171
172
/// <summary>
172
173
/// Gets or sets the flag indicating if summary tags should always be split to multiple lines.
173
174
/// </summary>
174
- public bool CommentXmlSplitSummaryTagToMultipleLines
175
+ public bool XmlSplitSummaryTag
175
176
{
176
177
get { return _options . XmlSplitSummaryTag ; }
177
178
set
@@ -187,7 +188,7 @@ public bool CommentXmlSplitSummaryTagToMultipleLines
187
188
/// <summary>
188
189
/// Gets or sets the amount of extra spacing to add before XML values.
189
190
/// </summary>
190
- public int CommentXmlValueIndent
191
+ public int XmlValueIndent
191
192
{
192
193
get { return _options . XmlValueIndent ; }
193
194
set
@@ -201,7 +202,7 @@ public int CommentXmlValueIndent
201
202
}
202
203
}
203
204
204
- public bool CommentXmlTagsToLowerCase
205
+ public bool XmlTagsToLowerCase
205
206
{
206
207
get { return _options . XmlTagsToLowerCase ; }
207
208
set
@@ -214,7 +215,7 @@ public bool CommentXmlTagsToLowerCase
214
215
}
215
216
}
216
217
217
- public bool CommentXmlSpaceSingleTags
218
+ public bool XmlSpaceSingleTags
218
219
{
219
220
get { return _options . XmlSpaceSingleTags ; }
220
221
set
@@ -227,7 +228,7 @@ public bool CommentXmlSpaceSingleTags
227
228
}
228
229
}
229
230
230
- public bool CommentXmlKeepTagsTogether
231
+ public bool XmlKeepTagsTogether
231
232
{
232
233
get { return _options . XmlKeepTagsTogether ; }
233
234
set
@@ -240,7 +241,7 @@ public bool CommentXmlKeepTagsTogether
240
241
}
241
242
}
242
243
243
- public bool CommentXmlSplitAllTags
244
+ public bool XmlSplitAllTags
244
245
{
245
246
get { return _options . XmlSplitAllTags ; }
246
247
set
@@ -253,6 +254,24 @@ public bool CommentXmlSplitAllTags
253
254
}
254
255
}
255
256
257
+ /// <summary>
258
+ /// Calls <see cref="Bindable.RaisePropertyChanged"/> for every public property exposed on
259
+ /// the <see cref="CodeCommentOptions"/> class. This ensures that changes to that class
260
+ /// (which do not raise events) will be bubbled up to the UI correctly.
261
+ /// </summary>
262
+ /// <remarks>
263
+ /// Note: For this to work properly, the wrapping property on this view model must match the
264
+ /// name of the underlying property within the options class.
265
+ /// </remarks>
266
+ private void RaisePropertyChangedForAllOptionsProperties ( )
267
+ {
268
+ var optionsProperties = _options . GetType ( ) . GetProperties ( ) ;
269
+ foreach ( var optionsProperty in optionsProperties )
270
+ {
271
+ RaisePropertyChanged ( optionsProperty . Name ) ;
272
+ }
273
+ }
274
+
256
275
#endregion Options
257
276
258
277
#region Preview Text and Helpers
0 commit comments