Skip to content

Commit dc266af

Browse files
authored
Adding doc comments for ThemeMode, ThemeModeConverter introduced in PresentationFramework (dotnet#10369)
1 parent 8af1b3a commit dc266af

File tree

5 files changed

+157
-90
lines changed

5 files changed

+157
-90
lines changed

xml/System.Windows/Application.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,9 +2476,28 @@ This example illustrates how to use XAML together with application-scope resourc
24762476
<ReturnType>System.Windows.ThemeMode</ReturnType>
24772477
</ReturnValue>
24782478
<Docs>
2479-
<summary>To be added.</summary>
2479+
<summary>Gets or sets the Fluent theme mode of the application.</summary>
24802480
<value>To be added.</value>
2481-
<remarks>To be added.</remarks>
2481+
<remarks>
2482+
<para>Setting this property controls if Fluent theme is loaded in Light, Dark or System mode.</para>
2483+
<para>It also controls the application of backdrop and darkmode on window.</para>
2484+
<para>The four values for the ThemeMode enum are :</para>
2485+
<para>
2486+
<see cref="P:System.Windows.ThemeMode.None" /> - No Fluent theme is loaded.</para>
2487+
<para>
2488+
<see cref="P:System.Windows.ThemeMode.System" /> - Fluent theme is loaded based on the system theme.</para>
2489+
<para>
2490+
<see cref="P:System.Windows.ThemeMode.Light" /> - Fluent theme is loaded in Light mode.</para>
2491+
<para>
2492+
<see cref="P:System.Windows.ThemeMode.Dark" /> - Fluent theme is loaded in Dark mode.</para>
2493+
<para>These values are predefined in <see cref="P:System.Windows.Application.ThemeMode" /> struct The default value is <see cref="P:System.Windows.ThemeMode.None" />.</para>
2494+
<para>
2495+
<see cref="P:System.Windows.Application.ThemeMode" /> and <see cref="P:System.Windows.Application.Resources" /> are designed to be in sync with each other.</para>
2496+
<para>Syncing is done in order to avoid UI inconsistencies, where the window is in dark mode but the controls within are in light mode or vice versa.</para>
2497+
<para>Setting this property loads the Fluent theme dictionaries in the application resources.</para>
2498+
<para>So, if you set this property, it is preferrable to not include Fluent theme dictionaries in the application resources manually. If you do, the Fluent theme dictionaries added in the application resources will take precedence over the ones added by setting this property.</para>
2499+
<para>This property is experimental and may be removed in future versions.</para>
2500+
</remarks>
24822501
</Docs>
24832502
</Member>
24842503
<Member MemberName="TryFindResource">

xml/System.Windows/SystemColors.xml

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<ReturnType>System.Windows.Media.Color</ReturnType>
5151
</ReturnValue>
5252
<Docs>
53-
<summary>To be added.</summary>
53+
<summary>Gets the system accent color that's set by the user in OS settings.</summary>
5454
<value>To be added.</value>
5555
<remarks>To be added.</remarks>
5656
</Docs>
@@ -71,9 +71,13 @@
7171
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
7272
</ReturnValue>
7373
<Docs>
74-
<summary>To be added.</summary>
74+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColor" /> color.</summary>
7575
<value>To be added.</value>
76-
<remarks>To be added.</remarks>
76+
<remarks>
77+
<para>
78+
<see cref="P:System.Windows.SystemColors.AccentColor" /> is the system accent color that's set by the user in OS settings.</para>
79+
<para>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</para>
80+
</remarks>
7781
</Docs>
7882
</Member>
7983
<Member MemberName="AccentColorBrushKey">
@@ -92,7 +96,7 @@
9296
<ReturnType>System.Windows.ResourceKey</ReturnType>
9397
</ReturnValue>
9498
<Docs>
95-
<summary>To be added.</summary>
99+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorBrush" /> system resource key.</summary>
96100
<value>To be added.</value>
97101
<remarks>To be added.</remarks>
98102
</Docs>
@@ -113,7 +117,7 @@
113117
<ReturnType>System.Windows.Media.Color</ReturnType>
114118
</ReturnValue>
115119
<Docs>
116-
<summary>To be added.</summary>
120+
<summary>Gets the dark shade of the system accent color.</summary>
117121
<value>To be added.</value>
118122
<remarks>To be added.</remarks>
119123
</Docs>
@@ -134,9 +138,9 @@
134138
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
135139
</ReturnValue>
136140
<Docs>
137-
<summary>To be added.</summary>
141+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColorDark1" /> color.</summary>
138142
<value>To be added.</value>
139-
<remarks>To be added.</remarks>
143+
<remarks>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</remarks>
140144
</Docs>
141145
</Member>
142146
<Member MemberName="AccentColorDark1BrushKey">
@@ -155,7 +159,7 @@
155159
<ReturnType>System.Windows.ResourceKey</ReturnType>
156160
</ReturnValue>
157161
<Docs>
158-
<summary>To be added.</summary>
162+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorDark1Brush" /> system resource key.</summary>
159163
<value>To be added.</value>
160164
<remarks>To be added.</remarks>
161165
</Docs>
@@ -176,7 +180,7 @@
176180
<ReturnType>System.Windows.ResourceKey</ReturnType>
177181
</ReturnValue>
178182
<Docs>
179-
<summary>To be added.</summary>
183+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorDark1" /> system resource key.</summary>
180184
<value>To be added.</value>
181185
<remarks>To be added.</remarks>
182186
</Docs>
@@ -197,7 +201,7 @@
197201
<ReturnType>System.Windows.Media.Color</ReturnType>
198202
</ReturnValue>
199203
<Docs>
200-
<summary>To be added.</summary>
204+
<summary>Gets the darker shade of the system accent color.</summary>
201205
<value>To be added.</value>
202206
<remarks>To be added.</remarks>
203207
</Docs>
@@ -218,9 +222,9 @@
218222
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
219223
</ReturnValue>
220224
<Docs>
221-
<summary>To be added.</summary>
225+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColorDark2" /> color.</summary>
222226
<value>To be added.</value>
223-
<remarks>To be added.</remarks>
227+
<remarks>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</remarks>
224228
</Docs>
225229
</Member>
226230
<Member MemberName="AccentColorDark2BrushKey">
@@ -239,7 +243,7 @@
239243
<ReturnType>System.Windows.ResourceKey</ReturnType>
240244
</ReturnValue>
241245
<Docs>
242-
<summary>To be added.</summary>
246+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorDark2Brush" /> system resource key.</summary>
243247
<value>To be added.</value>
244248
<remarks>To be added.</remarks>
245249
</Docs>
@@ -260,7 +264,7 @@
260264
<ReturnType>System.Windows.ResourceKey</ReturnType>
261265
</ReturnValue>
262266
<Docs>
263-
<summary>To be added.</summary>
267+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorDark2" /> system resource key.</summary>
264268
<value>To be added.</value>
265269
<remarks>To be added.</remarks>
266270
</Docs>
@@ -281,7 +285,7 @@
281285
<ReturnType>System.Windows.Media.Color</ReturnType>
282286
</ReturnValue>
283287
<Docs>
284-
<summary>To be added.</summary>
288+
<summary>Gets the darkest shade of the system accent color.</summary>
285289
<value>To be added.</value>
286290
<remarks>To be added.</remarks>
287291
</Docs>
@@ -302,9 +306,9 @@
302306
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
303307
</ReturnValue>
304308
<Docs>
305-
<summary>To be added.</summary>
309+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColorDark3" /> color.</summary>
306310
<value>To be added.</value>
307-
<remarks>To be added.</remarks>
311+
<remarks>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</remarks>
308312
</Docs>
309313
</Member>
310314
<Member MemberName="AccentColorDark3BrushKey">
@@ -323,7 +327,7 @@
323327
<ReturnType>System.Windows.ResourceKey</ReturnType>
324328
</ReturnValue>
325329
<Docs>
326-
<summary>To be added.</summary>
330+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorDark3Brush" /> system resource key.</summary>
327331
<value>To be added.</value>
328332
<remarks>To be added.</remarks>
329333
</Docs>
@@ -344,7 +348,7 @@
344348
<ReturnType>System.Windows.ResourceKey</ReturnType>
345349
</ReturnValue>
346350
<Docs>
347-
<summary>To be added.</summary>
351+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorDark3" /> system resource key.</summary>
348352
<value>To be added.</value>
349353
<remarks>To be added.</remarks>
350354
</Docs>
@@ -365,7 +369,7 @@
365369
<ReturnType>System.Windows.ResourceKey</ReturnType>
366370
</ReturnValue>
367371
<Docs>
368-
<summary>To be added.</summary>
372+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColor" /> system resource key.</summary>
369373
<value>To be added.</value>
370374
<remarks>To be added.</remarks>
371375
</Docs>
@@ -386,7 +390,7 @@
386390
<ReturnType>System.Windows.Media.Color</ReturnType>
387391
</ReturnValue>
388392
<Docs>
389-
<summary>To be added.</summary>
393+
<summary>Gets the light shade of the system accent color.</summary>
390394
<value>To be added.</value>
391395
<remarks>To be added.</remarks>
392396
</Docs>
@@ -407,9 +411,9 @@
407411
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
408412
</ReturnValue>
409413
<Docs>
410-
<summary>To be added.</summary>
414+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColorLight1" /> color.</summary>
411415
<value>To be added.</value>
412-
<remarks>To be added.</remarks>
416+
<remarks>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</remarks>
413417
</Docs>
414418
</Member>
415419
<Member MemberName="AccentColorLight1BrushKey">
@@ -428,7 +432,7 @@
428432
<ReturnType>System.Windows.ResourceKey</ReturnType>
429433
</ReturnValue>
430434
<Docs>
431-
<summary>To be added.</summary>
435+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorLight1Brush" /> system resource key.</summary>
432436
<value>To be added.</value>
433437
<remarks>To be added.</remarks>
434438
</Docs>
@@ -449,7 +453,7 @@
449453
<ReturnType>System.Windows.ResourceKey</ReturnType>
450454
</ReturnValue>
451455
<Docs>
452-
<summary>To be added.</summary>
456+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorLight1" /> system resource key.</summary>
453457
<value>To be added.</value>
454458
<remarks>To be added.</remarks>
455459
</Docs>
@@ -470,7 +474,7 @@
470474
<ReturnType>System.Windows.Media.Color</ReturnType>
471475
</ReturnValue>
472476
<Docs>
473-
<summary>To be added.</summary>
477+
<summary>Gets the lighter shade of the system accent color.</summary>
474478
<value>To be added.</value>
475479
<remarks>To be added.</remarks>
476480
</Docs>
@@ -491,9 +495,9 @@
491495
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
492496
</ReturnValue>
493497
<Docs>
494-
<summary>To be added.</summary>
498+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColorLight2" /> color.</summary>
495499
<value>To be added.</value>
496-
<remarks>To be added.</remarks>
500+
<remarks>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</remarks>
497501
</Docs>
498502
</Member>
499503
<Member MemberName="AccentColorLight2BrushKey">
@@ -512,7 +516,7 @@
512516
<ReturnType>System.Windows.ResourceKey</ReturnType>
513517
</ReturnValue>
514518
<Docs>
515-
<summary>To be added.</summary>
519+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorLight2Brush" /> system resource key.</summary>
516520
<value>To be added.</value>
517521
<remarks>To be added.</remarks>
518522
</Docs>
@@ -533,7 +537,7 @@
533537
<ReturnType>System.Windows.ResourceKey</ReturnType>
534538
</ReturnValue>
535539
<Docs>
536-
<summary>To be added.</summary>
540+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorLight2" /> system resource key.</summary>
537541
<value>To be added.</value>
538542
<remarks>To be added.</remarks>
539543
</Docs>
@@ -554,7 +558,7 @@
554558
<ReturnType>System.Windows.Media.Color</ReturnType>
555559
</ReturnValue>
556560
<Docs>
557-
<summary>To be added.</summary>
561+
<summary>Gets the lightest shade of the system accent color.</summary>
558562
<value>To be added.</value>
559563
<remarks>To be added.</remarks>
560564
</Docs>
@@ -575,9 +579,9 @@
575579
<ReturnType>System.Windows.Media.SolidColorBrush</ReturnType>
576580
</ReturnValue>
577581
<Docs>
578-
<summary>To be added.</summary>
582+
<summary>Gets the brush corresponding to the <see cref="P:System.Windows.SystemColors.AccentColorLight3" /> color.</summary>
579583
<value>To be added.</value>
580-
<remarks>To be added.</remarks>
584+
<remarks>When <see cref="P:System.Windows.SystemParameters.HighContrast" /> is <see langword="true" />, this property returns <see cref="P:System.Windows.SystemColors.HighlightTextBrush" />.</remarks>
581585
</Docs>
582586
</Member>
583587
<Member MemberName="AccentColorLight3BrushKey">
@@ -596,7 +600,7 @@
596600
<ReturnType>System.Windows.ResourceKey</ReturnType>
597601
</ReturnValue>
598602
<Docs>
599-
<summary>To be added.</summary>
603+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorLight3Brush" /> system resource key.</summary>
600604
<value>To be added.</value>
601605
<remarks>To be added.</remarks>
602606
</Docs>
@@ -617,7 +621,7 @@
617621
<ReturnType>System.Windows.ResourceKey</ReturnType>
618622
</ReturnValue>
619623
<Docs>
620-
<summary>To be added.</summary>
624+
<summary>Gets the <see cref="P:System.Windows.SystemColors.AccentColorLight3" /> system resource key.</summary>
621625
<value>To be added.</value>
622626
<remarks>To be added.</remarks>
623627
</Docs>

0 commit comments

Comments
 (0)