Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Added pending inline comments to Page class #20933

Merged
merged 30 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bdb385a
Added pending inline comments to Page class
jsuarezruiz Mar 1, 2024
14123e8
Update src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
jsuarezruiz Mar 5, 2024
3a1007a
More changes
jsuarezruiz Mar 5, 2024
7413448
Merge branch 'main' into page-comments
jsuarezruiz Mar 12, 2024
33731dc
Changes from PR feedback
jsuarezruiz Mar 12, 2024
07174b5
Update src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
jsuarezruiz Mar 12, 2024
957f822
Update src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
jsuarezruiz Mar 12, 2024
f802bee
Update src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
jsuarezruiz Mar 12, 2024
65f22eb
More changes
jsuarezruiz Mar 12, 2024
06db5a1
Merge branch 'page-comments' of https://github.com/dotnet/maui into p…
jsuarezruiz Mar 12, 2024
e226374
More changes
jsuarezruiz Mar 12, 2024
d9fe8b2
more changes
jsuarezruiz Mar 12, 2024
04baaf2
Update src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
jsuarezruiz Mar 13, 2024
965cdce
Update src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
jsuarezruiz Mar 13, 2024
55dda46
More changes
jsuarezruiz Mar 13, 2024
a43efc9
Merge branch 'page-comments' of https://github.com/dotnet/maui into p…
jsuarezruiz Mar 13, 2024
efe44df
Removed outdated xml comments
jsuarezruiz Mar 25, 2024
bd05bbc
More changes
jsuarezruiz Mar 25, 2024
d35795e
Added pending langwords
jsuarezruiz Mar 26, 2024
52dbd0e
More fixes
jsuarezruiz Mar 26, 2024
0d13ee2
More changes
jsuarezruiz Mar 26, 2024
933c22f
Merge branch 'main' into page-comments
jsuarezruiz Apr 11, 2024
7a03122
Removed Windows platform specific Page xml file
jsuarezruiz Apr 11, 2024
2159676
Removed iOS platform specific page xml docs
jsuarezruiz Apr 11, 2024
981ba5d
Merge branch 'main' into page-comments
jsuarezruiz Apr 24, 2024
bf119ab
Merge branch 'main' into page-comments
jsuarezruiz Apr 25, 2024
2082bd2
More fixes
jsuarezruiz Apr 25, 2024
e0e0815
Merge branch 'main' into page-comments
jsuarezruiz May 8, 2024
62b49e7
Merge branch 'main' into page-comments
jsuarezruiz Jun 3, 2024
4c0a124
Updated docs
jsuarezruiz Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,49 @@ public static IPlatformElementConfiguration<Windows, FormsElement> SetToolbarPla

#region ToolbarDynamicOverflowEnabled

/// <summary>Bindable property for attached property <c>ToolbarDynamicOverflowEnabled</c>.</summary>
/// <summary>
/// Indicates whether toolbar items automatically move to the overflow menu when space is limited.
/// </summary>
public static readonly BindableProperty ToolbarDynamicOverflowEnabledProperty =
BindableProperty.CreateAttached("ToolbarDynamicOverflowEnabled", typeof(bool),
typeof(FormsElement), true);

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific/Page.xml" path="//Member[@MemberName='GetToolbarDynamicOverflowEnabled'][1]/Docs/*" />
/// <summary>
/// Gets a value that indicates whether toolbar items automatically move to the overflow menu when space is limited.
/// </summary>
/// <param name="element">A page, the VisualElement that occupies the entire screen.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// <returns>True if toolbar items automatically move to the overflow menu when space is limited; otherwise, false.</returns>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static bool GetToolbarDynamicOverflowEnabled(BindableObject element)
{
return (bool)element.GetValue(ToolbarDynamicOverflowEnabledProperty);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific/Page.xml" path="//Member[@MemberName='SetToolbarDynamicOverflowEnabled'][1]/Docs/*" />
/// <summary>
/// Sets a value that indicates whether toolbar items automatically move to the overflow menu when space is limited.
/// </summary>
/// <param name="element">A page, the VisualElement that occupies the entire screen.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// <param name="value">A value that indicates whether toolbar items automatically move to the overflow menu when space is limited</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static void SetToolbarDynamicOverflowEnabled(BindableObject element, bool value)
{
element.SetValue(ToolbarDynamicOverflowEnabledProperty, value);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific/Page.xml" path="//Member[@MemberName='GetToolbarDynamicOverflowEnabled'][2]/Docs/*" />
/// <summary>
/// Gets a value that indicates whether toolbar items automatically move to the overflow menu when space is limited.
jknaudt21 marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="config">The platform specific configuration that contains the element on which to perform the operation.</param>
/// <returns>True if toolbar items automatically move to the overflow menu when space is limited; otherwise, false.</returns>
public static bool GetToolbarDynamicOverflowEnabled(this IPlatformElementConfiguration<Windows, FormsElement> config)
{
return (bool)config.Element.GetValue(ToolbarDynamicOverflowEnabledProperty);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific/Page.xml" path="//Member[@MemberName='SetToolbarDynamicOverflowEnabled'][2]/Docs/*" />
/// <summary>
/// Sets a value that indicates whether toolbar items automatically move to the overflow menu when space is limited.
/// </summary>
/// <param name="config">The platform specific configuration that contains the element on which to perform the operation.</param>
/// <param name="value">A value that indicates whether toolbar items automatically move to the overflow menu when space is limited</param>
/// <returns>True if toolbar items automatically move to the overflow menu when space is limited; otherwise, false.</returns>
public static IPlatformElementConfiguration<Windows, FormsElement> SetToolbarDynamicOverflowEnabled(
this IPlatformElementConfiguration<Windows, FormsElement> config, bool value)
{
Expand Down
87 changes: 74 additions & 13 deletions src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,52 @@ public static IPlatformElementConfiguration<iOS, FormsElement> SetPreferredStatu
return config;
}

/// <summary>Bindable property for attached property <c>UseSafeArea</c>.</summary>
/// <summary>
/// Controls whether padding values are overridden with the safe area insets.
/// </summary>
#if MACCATALYST
public static readonly BindableProperty UseSafeAreaProperty = BindableProperty.Create("UseSafeArea", typeof(bool), typeof(Page), true);
#else
public static readonly BindableProperty UseSafeAreaProperty = BindableProperty.Create("UseSafeArea", typeof(bool), typeof(Page), false);
#endif

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='GetUseSafeArea']/Docs/*" />
/// <summary>
/// Gets a Boolean value that tells whether padding values are overridden with values that conform to the safe area on the device.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="element">The element whose safe area behavior to get.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// <returns>A Boolean value that tells whether padding values are overridden or not.</returns>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static bool GetUseSafeArea(BindableObject element)
{
return (bool)element.GetValue(UseSafeAreaProperty);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='SetUseSafeArea'][1]/Docs/*" />
/// <summary>
/// Sets a value that controls whether padding values are overridden with the safe area insets.
/// </summary>
/// <param name="element">The element whose safe area use behavior to set.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// <param name="value">The new safe area inset behavior.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static void SetUseSafeArea(BindableObject element, bool value)
{
element.SetValue(UseSafeAreaProperty, value);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='SetUseSafeArea'][2]/Docs/*" />
/// <summary>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// Sets a value that controls whether padding values are overridden with the safe area insets.
/// </summary>
/// <param name="config">The element whose safe area behavior to get.</param>
/// <param name="value">The new safe area inset behavior.</param>
/// <returns></returns>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static IPlatformElementConfiguration<iOS, FormsElement> SetUseSafeArea(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value)
{
SetUseSafeArea(config.Element, value);
return config;
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='UsingSafeArea']/Docs/*" />
/// <summary>
/// Returns a Boolean value that tells whether the padding is overridden with the safe area.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="config">The element whose safe area behavior to get.</param>
/// <returns>A Boolean value that tells whether the padding is overridden with the safe area.</returns>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static bool UsingSafeArea(this IPlatformElementConfiguration<iOS, FormsElement> config)
{
return GetUseSafeArea(config.Element);
Expand Down Expand Up @@ -161,29 +180,54 @@ public static IPlatformElementConfiguration<iOS, FormsElement> SetSafeAreaInsets
return config;
}

/// <summary>Bindable property for <see cref="ModalPresentationStyle"/>.</summary>
/// <summary>
/// Defines the modal presentation style of the Page.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public static readonly BindableProperty ModalPresentationStyleProperty =
BindableProperty.Create(nameof(ModalPresentationStyle), typeof(UIModalPresentationStyle), typeof(Page), UIModalPresentationStyle.FullScreen);

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='ModalPresentationStyle']/Docs/*" />
/// <summary>
/// Gets the modal presentation style of the Page.
/// </summary>
/// <param name="config">The platform specific configuration that contains the element on which to perform the operation.</param>
/// <returns>The modal presentation style.</returns>
public static UIModalPresentationStyle ModalPresentationStyle(this IPlatformElementConfiguration<iOS, FormsElement> config)
{
return GetModalPresentationStyle(config.Element);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='SetModalPresentationStyle']/Docs/*" />
/// <summary>
/// Sets the modal presentation style.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="config">The platform specific configuration that contains the element on which to perform the operation.</param>
/// <param name="value">The modal presentation style.</param>
/// <returns>The platform specific configuration that contains the element on which to perform the operation.</returns>
public static IPlatformElementConfiguration<iOS, FormsElement> SetModalPresentationStyle(this IPlatformElementConfiguration<iOS, FormsElement> config, UIModalPresentationStyle value)
{
SetModalPresentationStyle(config.Element, value);
return config;
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='GetModalPresentationStyle']/Docs/*" />
/// <summary>
/// Gets the current value of the UIModalPresentationStyle enumeration that's applied to the Page.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="element">A page, the VisualElement that occupies the entire screen.</param>
/// <returns>The current value of the UIModalPresentationStyle enumeration that's applied to the Page.</returns>
public static UIModalPresentationStyle GetModalPresentationStyle(BindableObject element)
{
return (UIModalPresentationStyle)element.GetValue(ModalPresentationStyleProperty);
}

/// <summary>
/// Sets the modal presentation style on a Page by specifying one of the following UIModalPresentationStyle enumeration values:
/// - FullScreen, which sets the modal presentation style to encompass the whole screen.By default, modal pages are displayed using this presentation style.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// - FormSheet, which sets the modal presentation style to be centered on and smaller than the screen.
/// - Automatic, which sets the modal presentation style to the default chosen by the system. For most view controllers, UIKit maps this to UIModalPresentationStyle.PageSheet, but some system view controllers may map it to a different style.
/// - OverFullScreen, which sets the modal presentation style to cover the screen.
/// - PageSheet, which sets the modal presentation style to cover the underlying content.
/// </summary>
/// <param name="element">A page, the VisualElement that occupies the entire screen.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// <param name="value">The modal presentation style.</param>
static void SetModalPresentationStyle(BindableObject element, UIModalPresentationStyle value)
{
element.SetValue(ModalPresentationStyleProperty, value);
Expand All @@ -193,25 +237,42 @@ static void SetModalPresentationStyle(BindableObject element, UIModalPresentatio
public static readonly BindableProperty PrefersHomeIndicatorAutoHiddenProperty =
BindableProperty.Create(nameof(PrefersHomeIndicatorAutoHidden), typeof(bool), typeof(Page), false);

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='GetPrefersHomeIndicatorAutoHidden']/Docs/*" />
/// <summary>
/// Gets a Boolean that indicates whether is allowed to hide the visual indicator for returning to the Home Screen.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="element">A page, the VisualElement that occupies the entire screen.</param>
/// <returns></returns>
public static bool GetPrefersHomeIndicatorAutoHidden(BindableObject element)
{
return (bool)element.GetValue(PrefersHomeIndicatorAutoHiddenProperty);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='SetPrefersHomeIndicatorAutoHidden'][1]/Docs/*" />
/// <summary>
/// Sets a Boolean that indicates whether is allowed to hide the visual indicator for returning to the Home Screen.
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="element">A page, the VisualElement that occupies the entire screen.</param>
/// <param name="value">True when hide the home indicator, or false if you want the indicator to show at all times.</param>
jsuarezruiz marked this conversation as resolved.
Show resolved Hide resolved
public static void SetPrefersHomeIndicatorAutoHidden(BindableObject element, bool value)
{
element.SetValue(PrefersHomeIndicatorAutoHiddenProperty, value);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='PrefersHomeIndicatorAutoHidden']/Docs/*" />
/// <summary>
/// Gets a Boolean that indicates whether is allowed to hide the visual indicator for returning to the Home Screen.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment as SetPrefersHomeIndicatorAutoHidden

/// </summary>
/// <param name="config">The platform specific configuration that contains the element on which to perform the operation.</param>
/// <returns>True when hide the home indicator, or false if you want the indicator to show at all times.</returns>
public static bool PrefersHomeIndicatorAutoHidden(this IPlatformElementConfiguration<iOS, FormsElement> config)
{
return GetPrefersHomeIndicatorAutoHidden(config.Element);
}

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='SetPrefersHomeIndicatorAutoHidden'][2]/Docs/*" />
/// <summary>
/// Sets a Boolean that indicates whether is allowed to hide the visual indicator for returning to the Home Screen.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this property different to SetPrefersHomeIndicatorAutoHidden?

/// </summary>
/// <param name="config">The platform specific configuration that contains the element on which to perform the operation.</param>
/// <param name="value">True when hide the home indicator, or false if you want the indicator to show at all times.</param>
/// <returns></returns>
public static IPlatformElementConfiguration<iOS, FormsElement> SetPrefersHomeIndicatorAutoHidden(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value)
{
SetPrefersHomeIndicatorAutoHidden(config.Element, value);
Expand Down
Loading