Skip to content

Commit 987fd81

Browse files
authored
Update VisualElement API Docs (#20242)
* Update VisualElement API Docs * Undo unrelated change
1 parent 74fbfcb commit 987fd81

File tree

7 files changed

+489
-2688
lines changed

7 files changed

+489
-2688
lines changed

src/Controls/docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml

Lines changed: 0 additions & 259 deletions
This file was deleted.

src/Controls/docs/Microsoft.Maui.Controls.PlatformConfiguration.TizenSpecific/VisualElement.xml

Lines changed: 0 additions & 1372 deletions
This file was deleted.

src/Controls/docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/VisualElement.xml

Lines changed: 0 additions & 968 deletions
This file was deleted.

src/Controls/src/Core/PlatformConfiguration/AndroidSpecific/VisualElement.cs

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ namespace Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific
33
{
44
using FormsElement = Maui.Controls.VisualElement;
55

6-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="Type[@FullName='Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.VisualElement']/Docs/*" />
6+
/// <summary>
7+
/// Controls the legacy color mode and elevation for visual elements on the Android platform.
8+
/// </summary>
79
public static class VisualElement
810
{
911
#region Elevation
@@ -13,25 +15,42 @@ public static class VisualElement
1315
BindableProperty.Create("Elevation", typeof(float?),
1416
typeof(FormsElement));
1517

16-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='GetElevation'][2]/Docs/*" />
18+
/// <summary>
19+
/// Gets the elevation for the element.
20+
/// </summary>
21+
/// <param name="element">The visual element on the Android platform whose elevation to get.</param>
22+
/// <returns>The elevation for the element.</returns>
1723
public static float? GetElevation(FormsElement element)
1824
{
1925
return (float?)element.GetValue(ElevationProperty);
2026
}
2127

22-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='SetElevation'][2]/Docs/*" />
28+
/// <summary>
29+
/// Sets the elevation for the visual element.
30+
/// </summary>
31+
/// <param name="element"></param>
32+
/// <param name="value">The new elevation value.</param>
2333
public static void SetElevation(FormsElement element, float? value)
2434
{
2535
element.SetValue(ElevationProperty, value);
2636
}
2737

28-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='GetElevation'][1]/Docs/*" />
38+
/// <summary>
39+
/// Gets the elevation for the element.
40+
/// </summary>
41+
/// <param name="config">The platform configuration for the visual element on the Android platform whose elevation to get.</param>
42+
/// <returns>The elevation for the element.</returns>
2943
public static float? GetElevation(this IPlatformElementConfiguration<Android, FormsElement> config)
3044
{
3145
return GetElevation(config.Element);
3246
}
3347

34-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='SetElevation'][1]/Docs/*" />
48+
/// <summary>
49+
/// Sets the elevation for the visual element.
50+
/// </summary>
51+
/// <param name="config">The visual element on the Android platform whose elevation to set.</param>
52+
/// <param name="value">The new elevation value.</param>
53+
/// <returns></returns>
3554
public static IPlatformElementConfiguration<Android, FormsElement> SetElevation(this IPlatformElementConfiguration<Android, FormsElement> config, float? value)
3655
{
3756
SetElevation(config.Element, value);
@@ -47,25 +66,42 @@ public static IPlatformElementConfiguration<Android, FormsElement> SetElevation(
4766
BindableProperty.CreateAttached("IsLegacyColorModeEnabled", typeof(bool),
4867
typeof(FormsElement), true);
4968

50-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='GetIsLegacyColorModeEnabled'][1]/Docs/*" />
69+
/// <summary>
70+
/// Gets whether or not the legacy color mode for this element is enabled.
71+
/// </summary>
72+
/// <param name="element">The element on the Android platform whose legacy color mode status to get.</param>
73+
/// <returns><see langword="true"/> if legacy color mode is enabled for this element, otherwise <see langword="false"/>.</returns>
5174
public static bool GetIsLegacyColorModeEnabled(BindableObject element)
5275
{
5376
return (bool)element.GetValue(IsLegacyColorModeEnabledProperty);
5477
}
5578

56-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='SetIsLegacyColorModeEnabled'][1]/Docs/*" />
79+
/// <summary>
80+
/// Sets whether or not the legacy color mode for this element is enabled.
81+
/// </summary>
82+
/// <param name="element">The platform configuration for the visual element on the Android platform whose legacy color mode status to set.</param>
83+
/// <param name="value"><see langword="true" /> to enable legacy color mode. Otherwise, <see langword="false" />.</param>
5784
public static void SetIsLegacyColorModeEnabled(BindableObject element, bool value)
5885
{
5986
element.SetValue(IsLegacyColorModeEnabledProperty, value);
6087
}
6188

62-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='GetIsLegacyColorModeEnabled'][2]/Docs/*" />
89+
/// <summary>
90+
/// Gets whether or not the legacy color mode for this element is enabled.
91+
/// </summary>
92+
/// <param name="config">The platform configuration for the visual element on the Android platform whose legacy color mode status to get.</param>
93+
/// <returns><see langword="true"/> if legacy color mode is enabled for this element, otherwise <see langword="false"/>.</returns>
6394
public static bool GetIsLegacyColorModeEnabled(this IPlatformElementConfiguration<Android, FormsElement> config)
6495
{
6596
return (bool)config.Element.GetValue(IsLegacyColorModeEnabledProperty);
6697
}
6798

68-
/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific/VisualElement.xml" path="//Member[@MemberName='SetIsLegacyColorModeEnabled'][2]/Docs/*" />
99+
/// <summary>
100+
/// Sets whether or not the legacy color mode for this element is enabled.
101+
/// </summary>
102+
/// <param name="config">The platform configuration for the visual element on the Android platform whose legacy color mode status to set.</param>
103+
/// <param name="value"><see langword="true" /> to enable legacy color mode. Otherwise, <see langword="false" />.</param>
104+
/// <returns>A fluent object on which the developer may make further method calls.</returns>
69105
public static IPlatformElementConfiguration<Android, FormsElement> SetIsLegacyColorModeEnabled(
70106
this IPlatformElementConfiguration<Android, FormsElement> config, bool value)
71107
{

0 commit comments

Comments
 (0)