File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Microsoft.Toolkit.Mvvm/ComponentModel/Attributes Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ namespace Microsoft.Toolkit.Mvvm.ComponentModel
2222 /// {
2323 /// [ObservableProperty]
2424 /// private string name;
25+ ///
26+ /// [ObservableProperty]
27+ /// private bool isEnabled;
2528 /// }
2629 /// </code>
2730 /// </para>
@@ -34,9 +37,21 @@ namespace Microsoft.Toolkit.Mvvm.ComponentModel
3437 /// get => name;
3538 /// set => SetProperty(ref name, value);
3639 /// }
40+ ///
41+ /// public bool IsEnabled
42+ /// {
43+ /// get => name;
44+ /// set => SetProperty(ref isEnabled, value);
45+ /// }
3746 /// }
3847 /// </code>
3948 /// </summary>
49+ /// <remarks>
50+ /// The generated properties will automatically use the <c>UpperCamelCase</c> format for their names,
51+ /// which will be derived from the field names. The generator can also recognize fields using either
52+ /// the <c>_lowerCamel</c> or <c>m_lowerCamel</c> naming scheme. Otherwise, the first character in the
53+ /// source field name will be converted to uppercase (eg. <c>isEnabled</c> to <c>IsEnabled</c>).
54+ /// </remarks>
4055 [ AttributeUsage ( AttributeTargets . Field , AllowMultiple = false , Inherited = false ) ]
4156 public sealed class ObservablePropertyAttribute : Attribute
4257 {
You can’t perform that action at this time.
0 commit comments