From cc14260dc650ab2f96819ed35a19d4515fe47bf2 Mon Sep 17 00:00:00 2001 From: dipeshmsft Date: Fri, 6 Sep 2024 19:11:50 +0530 Subject: [PATCH 1/5] Adding doc comments for ThemeMode, ThemeModeConverter introduced in PresentationFramework --- xml/System.Windows/Application.xml | 25 ++++++- xml/System.Windows/ThemeMode.xml | 79 +++++++++++++++-------- xml/System.Windows/ThemeModeConverter.xml | 47 ++++++++------ xml/System.Windows/Window.xml | 25 ++++++- 4 files changed, 124 insertions(+), 52 deletions(-) diff --git a/xml/System.Windows/Application.xml b/xml/System.Windows/Application.xml index 4bfa99989ca..15d9aacc816 100644 --- a/xml/System.Windows/Application.xml +++ b/xml/System.Windows/Application.xml @@ -2476,9 +2476,30 @@ This example illustrates how to use XAML together with application-scope resourc System.Windows.ThemeMode - To be added. + + The ThemeMode property is used to set the Fluent theme mode of the application. + Setting this property controls if Fluent is loaded in Light, Dark or System mode. + It also controls the application of backdrop and darkmode on window. + The four values for the ThemeMode enum are : + + - No Fluent theme is loaded. + + - Fluent theme is loaded based on the system theme. + + - Fluent theme is loaded in Light mode. + + - Fluent theme is loaded in Dark mode. + These values are predefined in struct The default value is . + To be added. - To be added. + + + and are designed to be in sync with each other. + 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. + Setting this property will load the Fluent theme dictionaries in the application resources. + So, if you are setting 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. + This property is experimental and may be removed in future versions. + diff --git a/xml/System.Windows/ThemeMode.xml b/xml/System.Windows/ThemeMode.xml index afae25cd0cf..72b4d11ae35 100644 --- a/xml/System.Windows/ThemeMode.xml +++ b/xml/System.Windows/ThemeMode.xml @@ -28,8 +28,13 @@ - To be added. - To be added. + + ThemeMode structure describes the Fluent theme mode to be applied on Application or a Window. + + + This is an experimental API and may be modified or removed in future releases. + Since this is an experimental API, rather than creating a new instance of ThemeMode, use the static properties Light, Dark, System and None. + @@ -48,8 +53,8 @@ - To be added. - To be added. + Name of theme mode + Creates a new ThemeMode object with the specified value. To be added. @@ -69,7 +74,10 @@ System.Windows.ThemeMode - To be added. + + Predefined theme mode: Dark. + Whenever this mode is set on or , Fluent Dark theme will be applied. + To be added. To be added. @@ -93,9 +101,9 @@ - To be added. - To be added. - To be added. + ThemeMode object to compare with. + Checks whether the object is equal to another ThemeMode object. + Returns when the ThemeMode objects are equal, and otherwise. To be added. @@ -121,9 +129,9 @@ - To be added. - To be added. - To be added. + ThemeMode object to compare with + Checks whether the ThemeMode object is equal to another ThemeMode object. + Returns when the ThemeMode objects are equal, and otherwise. To be added. @@ -144,8 +152,8 @@ - To be added. - To be added. + Compute hash code for this object. + A 32-bit signed integer hash code. To be added. @@ -165,7 +173,10 @@ System.Windows.ThemeMode - To be added. + + Predefined theme mode: Light. + Whenever this mode is set on or , Fluent Light theme will be applied. + To be added. To be added. @@ -186,9 +197,14 @@ System.Windows.ThemeMode - To be added. + + Predefined theme mode: None. + This is the default value for and and it means that Fluent theme will not be applied on the Application or Window. + To be added. - To be added. + + In case, when Application.ThemeNode is not set to None, even if Window.ThemeMode is set to None, the Fluent theme will be applied on the Window. + @@ -211,10 +227,12 @@ - To be added. - To be added. - To be added. - To be added. + First ThemeMode object to compare + Second ThemeMode object to compare + Checks whether two ThemeMode objects are equal. + + Returns when both the ThemeMode objects are equal, and otherwise. + To be added. @@ -238,10 +256,12 @@ - To be added. - To be added. - To be added. - To be added. + First ThemeMode object to compare + Second ThemeMode object to compare + Checks whether two ThemeMode objects are not equal. + + Returns when the ThemeMode objects are not equal, and otherwise. + To be added. @@ -261,7 +281,10 @@ System.Windows.ThemeMode - To be added. + + Perdefined theme mode : System. + Whenever this mode is set on or , Fluent theme will be applied based on the system theme. + To be added. To be added. @@ -283,8 +306,8 @@ - To be added. - To be added. + Creates a string representation of the ThemeMode object. + A string representation of this object. To be added. @@ -304,7 +327,7 @@ System.String - To be added. + Gets the value of the ThemeMode. To be added. To be added. diff --git a/xml/System.Windows/ThemeModeConverter.xml b/xml/System.Windows/ThemeModeConverter.xml index 7fe8ec90ab5..986c84e18a7 100644 --- a/xml/System.Windows/ThemeModeConverter.xml +++ b/xml/System.Windows/ThemeModeConverter.xml @@ -20,7 +20,9 @@ - To be added. + + ThemeModeConverter - Converter class for converting instances of other types to and from ThemeMode instances. + To be added. @@ -61,10 +63,10 @@ - To be added. - To be added. - To be added. - To be added. + The ITypeDescriptorContext for this call. + The Type being queried for support. + CanConvertFrom - Returns whether or not this class can convert from a given type. + bool - if thie converter can convert from the provided type, if not. To be added. @@ -88,10 +90,10 @@ - To be added. - To be added. - To be added. - To be added. + The ITypeDescriptorContext for this call. + The Type being queried for support. + CanConvertTo - Returns whether or not this class can convert to a given type. + bool - if this converter can convert to the provided type, if not. To be added. @@ -116,12 +118,13 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The ITypeDescriptorContext for this call. + The CultureInfo which is respected when converting. + The object to convert to a ThemeMode. + ConvertFrom - Attempts to convert to a ThemeMode from the given object + ThemeMode instance which was constructed. To be added. + An ArgumentNullException is thrown if the example object is . @@ -146,13 +149,17 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The ITypeDescriptorContext for this call. + The CultureInfo which is respected when converting. + The ThemeMode to convert. + The type to which to convert the ThemeMode instance. + ConvertTo - Attempts to convert a ThemeMode to the given type + The object which was constructoed. To be added. + An ArgumentNullException is thrown if the example object is . + + An ArgumentException is thrown if the object is not and is not a ThemeMode, or if the destinationType isn't one of the valid destination types. + diff --git a/xml/System.Windows/Window.xml b/xml/System.Windows/Window.xml index b18daecd9d6..d63b250199c 100644 --- a/xml/System.Windows/Window.xml +++ b/xml/System.Windows/Window.xml @@ -2597,9 +2597,30 @@ The following example shows a **File** > **Exit** menu being handled to explicit System.Windows.ThemeMode - To be added. + + The ThemeMode property is used to set the Fluent theme mode of the application. + Setting this property controls if Fluent is loaded in Light, Dark or System mode. + It also controls the application of backdrop and darkmode on window. + The four values for the ThemeMode enum are : + + - No Fluent theme is loaded. + + - Fluent theme is loaded based on the system theme. + + - Fluent theme is loaded in Light mode. + + - Fluent theme is loaded in Dark mode. + These values are predefined in struct The default value is . + To be added. - To be added. + + + and are designed to be in sync with each other. + 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. + Setting this property will load the Fluent theme dictionaries in the application resources. + So, if you are setting 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. + This property is experimental and may be removed in future versions. + From a354091c03a9042c729b2776b71630762777f359 Mon Sep 17 00:00:00 2001 From: dipeshmsft Date: Fri, 6 Sep 2024 23:28:57 +0530 Subject: [PATCH 2/5] Added documentation for SystemColors.AccentColor's --- xml/System.Windows/SystemColors.xml | 70 ++++++++++++++--------------- xml/System.Windows/ThemeMode.xml | 2 +- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/xml/System.Windows/SystemColors.xml b/xml/System.Windows/SystemColors.xml index eb776245a19..4bb1cfe1e30 100644 --- a/xml/System.Windows/SystemColors.xml +++ b/xml/System.Windows/SystemColors.xml @@ -50,7 +50,7 @@ System.Windows.Media.Color - To be added. + System accent color that is set by the user in OS settings. To be added. To be added. @@ -71,9 +71,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to system accent color ( ) To be added. - To be added. + When is , it returns . @@ -92,7 +92,7 @@ System.Windows.ResourceKey - To be added. + AccentColorBrush System Resource Key To be added. To be added. @@ -113,7 +113,7 @@ System.Windows.Media.Color - To be added. + Dark shade of system accent color. To be added. To be added. @@ -134,9 +134,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to color To be added. - To be added. + When is , it returns . @@ -155,7 +155,7 @@ System.Windows.ResourceKey - To be added. + AccentColorDark1Brush System Resource Key To be added. To be added. @@ -176,7 +176,7 @@ System.Windows.ResourceKey - To be added. + AccentColorDark1 System Resource Key To be added. To be added. @@ -197,7 +197,7 @@ System.Windows.Media.Color - To be added. + Darker shade of system accent color. To be added. To be added. @@ -218,9 +218,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to color To be added. - To be added. + When is , it returns . @@ -239,7 +239,7 @@ System.Windows.ResourceKey - To be added. + AccentColorDark2Brush System Resource Key To be added. To be added. @@ -260,7 +260,7 @@ System.Windows.ResourceKey - To be added. + AccentColorDark2 System Resource Key To be added. To be added. @@ -281,7 +281,7 @@ System.Windows.Media.Color - To be added. + Darkest shade of system accent color. To be added. To be added. @@ -302,9 +302,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to color To be added. - To be added. + When is , it returns . @@ -323,7 +323,7 @@ System.Windows.ResourceKey - To be added. + AccentColorDark3Brush System Resource Key To be added. To be added. @@ -344,7 +344,7 @@ System.Windows.ResourceKey - To be added. + AccentColorDark3 System Resource Key To be added. To be added. @@ -365,7 +365,7 @@ System.Windows.ResourceKey - To be added. + AccentColor System Resource Key To be added. To be added. @@ -386,7 +386,7 @@ System.Windows.Media.Color - To be added. + Light shade of system accent color. To be added. To be added. @@ -407,9 +407,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to color To be added. - To be added. + When is , it returns . @@ -428,7 +428,7 @@ System.Windows.ResourceKey - To be added. + AccentColorLight1Brush System Resource Key To be added. To be added. @@ -449,7 +449,7 @@ System.Windows.ResourceKey - To be added. + AccentColorLight1 System Resource Key To be added. To be added. @@ -470,7 +470,7 @@ System.Windows.Media.Color - To be added. + Lighter shade of system accent color. To be added. To be added. @@ -491,9 +491,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to color To be added. - To be added. + When is , it returns . @@ -512,7 +512,7 @@ System.Windows.ResourceKey - To be added. + AccentColorLight2Brush System Resource Key To be added. To be added. @@ -533,7 +533,7 @@ System.Windows.ResourceKey - To be added. + AccentColorLight2 System Resource Key To be added. To be added. @@ -554,7 +554,7 @@ System.Windows.Media.Color - To be added. + Lightest shade of system accent color. To be added. To be added. @@ -575,9 +575,9 @@ System.Windows.Media.SolidColorBrush - To be added. + Brush corresponding to color To be added. - To be added. + When is , it returns . @@ -596,7 +596,7 @@ System.Windows.ResourceKey - To be added. + AccentColorLight3Brush System Resource Key To be added. To be added. @@ -617,7 +617,7 @@ System.Windows.ResourceKey - To be added. + AccentColorLight3 System Resource Key To be added. To be added. diff --git a/xml/System.Windows/ThemeMode.xml b/xml/System.Windows/ThemeMode.xml index 72b4d11ae35..ccff1554f1e 100644 --- a/xml/System.Windows/ThemeMode.xml +++ b/xml/System.Windows/ThemeMode.xml @@ -203,7 +203,7 @@ To be added. - In case, when Application.ThemeNode is not set to None, even if Window.ThemeMode is set to None, the Fluent theme will be applied on the Window. + In case, when is not set to None, even if is set to None, the Fluent theme will be applied on the Window. From cecbea75ed0661966b1706aea25adf26957e5fcf Mon Sep 17 00:00:00 2001 From: dipeshmsft Date: Tue, 10 Sep 2024 13:04:57 +0530 Subject: [PATCH 3/5] Resolved PR Comments --- xml/System.Windows/Application.xml | 14 ++--- xml/System.Windows/SystemColors.xml | 74 ++++++++++++----------- xml/System.Windows/ThemeMode.xml | 67 ++++++++++---------- xml/System.Windows/ThemeModeConverter.xml | 30 ++++----- xml/System.Windows/Window.xml | 14 ++--- 5 files changed, 97 insertions(+), 102 deletions(-) diff --git a/xml/System.Windows/Application.xml b/xml/System.Windows/Application.xml index 15d9aacc816..efdec80b3de 100644 --- a/xml/System.Windows/Application.xml +++ b/xml/System.Windows/Application.xml @@ -2476,9 +2476,10 @@ This example illustrates how to use XAML together with application-scope resourc System.Windows.ThemeMode - - The ThemeMode property is used to set the Fluent theme mode of the application. - Setting this property controls if Fluent is loaded in Light, Dark or System mode. + Gets or sets the Fluent theme mode of the application. + To be added. + + Setting this property controls if Fluent theme is loaded in Light, Dark or System mode. It also controls the application of backdrop and darkmode on window. The four values for the ThemeMode enum are : @@ -2490,14 +2491,11 @@ This example illustrates how to use XAML together with application-scope resourc - Fluent theme is loaded in Dark mode. These values are predefined in struct The default value is . - - To be added. - and are designed to be in sync with each other. 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. - Setting this property will load the Fluent theme dictionaries in the application resources. - So, if you are setting 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. + Setting this property loads the Fluent theme dictionaries in the application resources. + 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. This property is experimental and may be removed in future versions. diff --git a/xml/System.Windows/SystemColors.xml b/xml/System.Windows/SystemColors.xml index 4bb1cfe1e30..0a146adedab 100644 --- a/xml/System.Windows/SystemColors.xml +++ b/xml/System.Windows/SystemColors.xml @@ -50,7 +50,7 @@ System.Windows.Media.Color - System accent color that is set by the user in OS settings. + Gets the system accent color that's set by the user in OS settings. To be added. To be added. @@ -71,9 +71,13 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to system accent color ( ) + Gets the brush corresponding to the color. To be added. - When is , it returns . + + + is the system accent color that's set by the user in OS settings. + When is , this property returns . + @@ -92,7 +96,7 @@ System.Windows.ResourceKey - AccentColorBrush System Resource Key + Gets the system resource key. To be added. To be added. @@ -113,7 +117,7 @@ System.Windows.Media.Color - Dark shade of system accent color. + Gets the dark shade of the system accent color. To be added. To be added. @@ -134,9 +138,9 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to color + Gets the brush corresponding to the color. To be added. - When is , it returns . + When is , this property returns . @@ -155,7 +159,7 @@ System.Windows.ResourceKey - AccentColorDark1Brush System Resource Key + Gets the system resource key. To be added. To be added. @@ -176,7 +180,7 @@ System.Windows.ResourceKey - AccentColorDark1 System Resource Key + Gets the system resource key. To be added. To be added. @@ -197,7 +201,7 @@ System.Windows.Media.Color - Darker shade of system accent color. + Gets the darker shade of the system accent color. To be added. To be added. @@ -218,9 +222,9 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to color + Gets the brush corresponding to the color. To be added. - When is , it returns . + When is , this property returns . @@ -239,7 +243,7 @@ System.Windows.ResourceKey - AccentColorDark2Brush System Resource Key + Gets the system resource key. To be added. To be added. @@ -260,7 +264,7 @@ System.Windows.ResourceKey - AccentColorDark2 System Resource Key + Gets the system resource key. To be added. To be added. @@ -281,7 +285,7 @@ System.Windows.Media.Color - Darkest shade of system accent color. + Gets the darkest shade of the system accent color. To be added. To be added. @@ -302,9 +306,9 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to color + Gets the brush corresponding to the color. To be added. - When is , it returns . + When is , this property returns . @@ -323,7 +327,7 @@ System.Windows.ResourceKey - AccentColorDark3Brush System Resource Key + Gets the system resource key. To be added. To be added. @@ -344,7 +348,7 @@ System.Windows.ResourceKey - AccentColorDark3 System Resource Key + Gets the system resource key. To be added. To be added. @@ -365,7 +369,7 @@ System.Windows.ResourceKey - AccentColor System Resource Key + Gets the system resource key. To be added. To be added. @@ -386,7 +390,7 @@ System.Windows.Media.Color - Light shade of system accent color. + Gets the light shade of the system accent color. To be added. To be added. @@ -407,9 +411,9 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to color + Gets the brush corresponding to the color. To be added. - When is , it returns . + When is , this property returns . @@ -428,7 +432,7 @@ System.Windows.ResourceKey - AccentColorLight1Brush System Resource Key + Gets the system resource key. To be added. To be added. @@ -449,7 +453,7 @@ System.Windows.ResourceKey - AccentColorLight1 System Resource Key + Gets the system resource key. To be added. To be added. @@ -470,7 +474,7 @@ System.Windows.Media.Color - Lighter shade of system accent color. + Gets the lighter shade of the system accent color. To be added. To be added. @@ -491,9 +495,9 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to color + Gets the brush corresponding to the color. To be added. - When is , it returns . + When is , this property returns . @@ -512,7 +516,7 @@ System.Windows.ResourceKey - AccentColorLight2Brush System Resource Key + Gets the system resource key. To be added. To be added. @@ -533,7 +537,7 @@ System.Windows.ResourceKey - AccentColorLight2 System Resource Key + Gets the system resource key. To be added. To be added. @@ -554,7 +558,7 @@ System.Windows.Media.Color - Lightest shade of system accent color. + Gets the lightest shade of the system accent color. To be added. To be added. @@ -575,9 +579,9 @@ System.Windows.Media.SolidColorBrush - Brush corresponding to color + Gets the brush corresponding to the color. To be added. - When is , it returns . + When is , this property returns . @@ -596,7 +600,7 @@ System.Windows.ResourceKey - AccentColorLight3Brush System Resource Key + Gets the system resource key. To be added. To be added. @@ -617,7 +621,7 @@ System.Windows.ResourceKey - AccentColorLight3 System Resource Key + Gets the system resource key. To be added. To be added. diff --git a/xml/System.Windows/ThemeMode.xml b/xml/System.Windows/ThemeMode.xml index ccff1554f1e..45ff43cee8b 100644 --- a/xml/System.Windows/ThemeMode.xml +++ b/xml/System.Windows/ThemeMode.xml @@ -28,12 +28,10 @@ - - ThemeMode structure describes the Fluent theme mode to be applied on Application or a Window. - + Describes the Fluent theme mode to apply to an application or window. This is an experimental API and may be modified or removed in future releases. - Since this is an experimental API, rather than creating a new instance of ThemeMode, use the static properties Light, Dark, System and None. + Since this is an experimental API, rather than creating a new instance of ThemeMode, use the static properties Light, Dark, System, and None. @@ -53,7 +51,7 @@ - Name of theme mode + The name of the theme mode Creates a new ThemeMode object with the specified value. To be added. @@ -74,12 +72,11 @@ System.Windows.ThemeMode - - Predefined theme mode: Dark. - Whenever this mode is set on or , Fluent Dark theme will be applied. - + Gets the Dark predefined theme mode. To be added. - To be added. + + Whenever this mode is set on or , Fluent Dark theme will be applied. + @@ -102,8 +99,9 @@ ThemeMode object to compare with. - Checks whether the object is equal to another ThemeMode object. - Returns when the ThemeMode objects are equal, and otherwise. + Checks whether this instance is equal to another ThemeMode object. + + if the ThemeMode objects are equal; otherwise. To be added. @@ -130,8 +128,9 @@ ThemeMode object to compare with - Checks whether the ThemeMode object is equal to another ThemeMode object. - Returns when the ThemeMode objects are equal, and otherwise. + Checks whether this instance is equal to another ThemeMode object. + + if the ThemeMode objects are equal; otherwise. To be added. @@ -152,7 +151,7 @@ - Compute hash code for this object. + Computes the hash code for this object. A 32-bit signed integer hash code. To be added. @@ -173,12 +172,11 @@ System.Windows.ThemeMode - - Predefined theme mode: Light. - Whenever this mode is set on or , Fluent Light theme will be applied. - + Gets the Light predefined theme mode. To be added. - To be added. + + Whenever this mode is set on or , Fluent Light theme will be applied. + @@ -198,12 +196,12 @@ - Predefined theme mode: None. - This is the default value for and and it means that Fluent theme will not be applied on the Application or Window. + Gets the None predefined theme mode. To be added. - In case, when is not set to None, even if is set to None, the Fluent theme will be applied on the Window. + This is the default value for and and it means that Fluent theme will not be applied on the application or window. + In case, when is not set to None, even if is set to None, the Fluent theme will be applied on the window. @@ -227,12 +225,11 @@ - First ThemeMode object to compare - Second ThemeMode object to compare + The first ThemeMode object to compare. + The second ThemeMode object to compare. Checks whether two ThemeMode objects are equal. - Returns when both the ThemeMode objects are equal, and otherwise. - + if the ThemeMode objects are equal; otherwise. To be added. @@ -256,12 +253,11 @@ - First ThemeMode object to compare - Second ThemeMode object to compare + The first ThemeMode object to compare. + The second ThemeMode object to compare. Checks whether two ThemeMode objects are not equal. - Returns when the ThemeMode objects are not equal, and otherwise. - + if the ThemeMode objects are not equal; otherwise. To be added. @@ -281,12 +277,11 @@ System.Windows.ThemeMode - - Perdefined theme mode : System. - Whenever this mode is set on or , Fluent theme will be applied based on the system theme. - + Get the System predefined theme mode. To be added. - To be added. + + Whenever this mode is set on or , Fluent theme will be applied based on the system theme. + diff --git a/xml/System.Windows/ThemeModeConverter.xml b/xml/System.Windows/ThemeModeConverter.xml index 986c84e18a7..4c33d92f8eb 100644 --- a/xml/System.Windows/ThemeModeConverter.xml +++ b/xml/System.Windows/ThemeModeConverter.xml @@ -20,9 +20,7 @@ - - ThemeModeConverter - Converter class for converting instances of other types to and from ThemeMode instances. - + Converts instances of other types to and from ThemeMode instances. To be added. @@ -65,8 +63,9 @@ The ITypeDescriptorContext for this call. The Type being queried for support. - CanConvertFrom - Returns whether or not this class can convert from a given type. - bool - if thie converter can convert from the provided type, if not. + Determines whether or not this class can convert from a given type. + + if the converter can convert from the provided type; otherwise, . To be added. @@ -92,8 +91,9 @@ The ITypeDescriptorContext for this call. The Type being queried for support. - CanConvertTo - Returns whether or not this class can convert to a given type. - bool - if this converter can convert to the provided type, if not. + Determines whether or not this class can convert to a given type. + + if this converter can convert to the provided type; otherwise, . To be added. @@ -121,10 +121,10 @@ The ITypeDescriptorContext for this call. The CultureInfo which is respected when converting. The object to convert to a ThemeMode. - ConvertFrom - Attempts to convert to a ThemeMode from the given object - ThemeMode instance which was constructed. + Attempts to convert to a ThemeMode from the specified object + The new ThemeMode instance. To be added. - An ArgumentNullException is thrown if the example object is . + The example object is . @@ -153,13 +153,13 @@ The CultureInfo which is respected when converting. The ThemeMode to convert. The type to which to convert the ThemeMode instance. - ConvertTo - Attempts to convert a ThemeMode to the given type - The object which was constructoed. + Attempts to convert a ThemeMode object to the specified type. + The newly constructed object. To be added. - An ArgumentNullException is thrown if the example object is . + + is . - An ArgumentException is thrown if the object is not and is not a ThemeMode, or if the destinationType isn't one of the valid destination types. - + is not a ThemeMode, or isn't a valid destination type. diff --git a/xml/System.Windows/Window.xml b/xml/System.Windows/Window.xml index d63b250199c..25a0307fbc6 100644 --- a/xml/System.Windows/Window.xml +++ b/xml/System.Windows/Window.xml @@ -2597,9 +2597,10 @@ The following example shows a **File** > **Exit** menu being handled to explicit System.Windows.ThemeMode - - The ThemeMode property is used to set the Fluent theme mode of the application. - Setting this property controls if Fluent is loaded in Light, Dark or System mode. + Gets or sets the Fluent theme mode of the window. + To be added. + + Setting this property controls if Fluent theme is loaded in Light, Dark or System mode. It also controls the application of backdrop and darkmode on window. The four values for the ThemeMode enum are : @@ -2611,14 +2612,11 @@ The following example shows a **File** > **Exit** menu being handled to explicit - Fluent theme is loaded in Dark mode. These values are predefined in struct The default value is . - - To be added. - and are designed to be in sync with each other. 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. - Setting this property will load the Fluent theme dictionaries in the application resources. - So, if you are setting 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. + Setting this property loads the Fluent theme dictionaries in the window resources. + So, if you set this property, it is preferrable to not include Fluent theme dictionaries in the window resources manually. If you do, the Fluent theme dictionaries added in the window resources will take precedence over the ones added by setting this property. This property is experimental and may be removed in future versions. From d797166bea43a62df0fd99c11602dab0e0ddfc62 Mon Sep 17 00:00:00 2001 From: dipeshmsft Date: Tue, 10 Sep 2024 14:49:16 +0530 Subject: [PATCH 4/5] Resolving PR Comments 2 --- xml/System.Windows/Window.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Windows/Window.xml b/xml/System.Windows/Window.xml index 25a0307fbc6..63cf03302a2 100644 --- a/xml/System.Windows/Window.xml +++ b/xml/System.Windows/Window.xml @@ -2604,7 +2604,7 @@ The following example shows a **File** > **Exit** menu being handled to explicit It also controls the application of backdrop and darkmode on window. The four values for the ThemeMode enum are : - - No Fluent theme is loaded. + - No Fluent theme is loaded. However, if is not None, then the window will appear as defined in . - Fluent theme is loaded based on the system theme. From 815289508dbf5a0f58b89e7714bf51e4df86d923 Mon Sep 17 00:00:00 2001 From: dipeshmsft Date: Tue, 10 Sep 2024 15:40:57 +0530 Subject: [PATCH 5/5] Fixed ThemeModeConverter docs --- xml/System.Windows/ThemeModeConverter.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xml/System.Windows/ThemeModeConverter.xml b/xml/System.Windows/ThemeModeConverter.xml index 4c33d92f8eb..e81cc97521e 100644 --- a/xml/System.Windows/ThemeModeConverter.xml +++ b/xml/System.Windows/ThemeModeConverter.xml @@ -120,9 +120,9 @@ The ITypeDescriptorContext for this call. The CultureInfo which is respected when converting. - The object to convert to a ThemeMode. - Attempts to convert to a ThemeMode from the specified object - The new ThemeMode instance. + The object to convert to a . + Attempts to convert to a from the specified object + The new instance. To be added. The example object is . @@ -151,15 +151,15 @@ The ITypeDescriptorContext for this call. The CultureInfo which is respected when converting. - The ThemeMode to convert. + The to convert. The type to which to convert the ThemeMode instance. - Attempts to convert a ThemeMode object to the specified type. + Attempts to convert a object to the specified type. The newly constructed object. To be added. is . - - is not a ThemeMode, or isn't a valid destination type. + + is or not a , or isn't a valid destination type.