Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8c06b0f
Expose safe area contracts for custom views
Aug 22, 2026
ecf8393
Fix safe area review feedback
Aug 23, 2026
dc737cb
Fix nested safe area updates on Apple platforms
Aug 23, 2026
5eb242e
Refine safe area mapping and validation
Aug 23, 2026
2185a28
Refine public safe-area contract
Aug 24, 2026
0cf1a57
Limit safe-area changes to product scope
Aug 24, 2026
92bad6c
Strengthen nested safe area invalidation coverage
Aug 24, 2026
b2e5216
Document custom safe area defaults
Aug 25, 2026
064d85c
Preserve legacy scroll safe area behavior
Aug 25, 2026
48fe0ad
Optimize safe area edge resolution
Aug 25, 2026
5fef2f8
Test mixed custom safe area defaults
Aug 25, 2026
84c2a6c
Handle overlapping safe area edges independently
Aug 25, 2026
7ea5fcd
Honor safe area edges in inherited containers
Aug 25, 2026
7b5118d
Harden safe area state transitions
Aug 25, 2026
f6db02a
Address final safe area review findings
Aug 25, 2026
f5a35e4
Expose effective safe area strategy
Aug 25, 2026
612020e
Fix safe area AOT profile type records
Aug 25, 2026
e5dde59
Prune unreachable safe area AOT entry
Aug 25, 2026
e6496d7
Preserve nested keyboard safe area padding
Aug 25, 2026
777f65e
Clarify safe area precedence guidance
Aug 25, 2026
490a33f
Keep safe area fix product-scoped
Aug 26, 2026
c32e41e
Handle nested soft input residuals
Aug 26, 2026
310d7e9
Cover transformed keyboard safe area geometry
Aug 26, 2026
c265a30
Address final safe area review feedback
Aug 26, 2026
542e0e9
Merge net11.0 into safe area API branch
Aug 26, 2026
104f814
Compare keyboard overlap at pixel boundaries
Aug 26, 2026
79cdc74
Harden iOS safe area edge handling
Aug 26, 2026
3d3c42b
Address safe area review follow-ups
Aug 27, 2026
ac8d98c
Address final safe area review feedback
Aug 27, 2026
92f72f9
Document safe area correctness invariants
Aug 27, 2026
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
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3284,9 +3284,9 @@ Methods:
Microsoft.Maui.Primitives.LayoutAlignment Microsoft.Maui.Controls.View:Microsoft.Maui.IView.get_VerticalLayoutAlignment ()
Microsoft.Maui.PropertyMapper Microsoft.Maui.Controls.View:Microsoft.Maui.IPropertyMapperView.GetPropertyMapperOverrides ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.Layout:get_SafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.Layout:Microsoft.Maui.ISafeAreaElement.SafeAreaEdgesDefaultValueCreator ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.Layout:Microsoft.Maui.ISafeAreaElement.GetDefaultSafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.ScrollView:get_SafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.ScrollView:Microsoft.Maui.ISafeAreaElement.SafeAreaEdgesDefaultValueCreator ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.ScrollView:Microsoft.Maui.ISafeAreaElement.GetDefaultSafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.SafeAreaEdges:get_Default ()
Microsoft.Maui.SafeAreaRegions Microsoft.Maui.Controls.ContentPage:Microsoft.Maui.ISafeAreaView2.GetSafeAreaRegionsForEdge (int)
Microsoft.Maui.SafeAreaRegions Microsoft.Maui.Controls.Layout:Microsoft.Maui.ISafeAreaView2.GetSafeAreaRegionsForEdge (int)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2591,9 +2591,9 @@ Methods:
Microsoft.Maui.Primitives.LayoutAlignment Microsoft.Maui.Controls.VisualElement:Microsoft.Maui.IView.get_VerticalLayoutAlignment ()
Microsoft.Maui.PropertyMapper Microsoft.Maui.Controls.View:Microsoft.Maui.IPropertyMapperView.GetPropertyMapperOverrides ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.Layout:get_SafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.Layout:Microsoft.Maui.ISafeAreaElement.SafeAreaEdgesDefaultValueCreator ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.Layout:Microsoft.Maui.ISafeAreaElement.GetDefaultSafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.ScrollView:get_SafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.ScrollView:Microsoft.Maui.ISafeAreaElement.SafeAreaEdgesDefaultValueCreator ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.Controls.ScrollView:Microsoft.Maui.ISafeAreaElement.GetDefaultSafeAreaEdges ()
Microsoft.Maui.SafeAreaEdges Microsoft.Maui.SafeAreaEdges:get_Default ()
Microsoft.Maui.SafeAreaRegions Microsoft.Maui.Controls.ContentPage:Microsoft.Maui.ISafeAreaView2.GetSafeAreaRegionsForEdge (int)
Microsoft.Maui.SafeAreaRegions Microsoft.Maui.Controls.Layout:Microsoft.Maui.ISafeAreaView2.GetSafeAreaRegionsForEdge (int)
Expand Down
7 changes: 2 additions & 5 deletions src/Controls/src/Core/Border/Border.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,17 +482,14 @@ SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
return regionForEdge;
}

/// <inheritdoc cref="ISafeAreaView2.SafeAreaInsets"/>
Thickness ISafeAreaView2.SafeAreaInsets { set { } } // Default no-op implementation for borders

/// <inheritdoc cref="ISafeAreaView2.HasExplicitSafeAreaEdges"/>
bool ISafeAreaView2.HasExplicitSafeAreaEdges => IsSetExplicitly(SafeAreaEdgesProperty);
bool ISafeAreaView2.HasExplicitSafeAreaEdges => SafeAreaElement.IsSafeAreaEdgesSet(this);

/// <summary>
/// Provides the default value for the <see cref="SafeAreaEdges"/> property.
/// </summary>
/// <returns>The default safe area edges of <see cref="SafeAreaEdges.None"/>.</returns>
SafeAreaEdges ISafeAreaElement.SafeAreaEdgesDefaultValueCreator()
SafeAreaEdges ISafeAreaElement.GetDefaultSafeAreaEdges()
{
return SafeAreaEdges.None;
}
Expand Down
9 changes: 4 additions & 5 deletions src/Controls/src/Core/ContentPage/ContentPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

using System;
using System.Diagnostics;

using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Devices;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.HotReload;
using Microsoft.Maui.Layouts;
using Microsoft.Maui.Devices;

namespace Microsoft.Maui.Controls
{
Expand Down Expand Up @@ -172,13 +171,13 @@ Size IContentView.CrossPlatformMeasure(double widthConstraint, double heightCons
}

/// <inheritdoc cref="ISafeAreaView2.HasExplicitSafeAreaEdges"/>
bool ISafeAreaView2.HasExplicitSafeAreaEdges => IsSetExplicitly(SafeAreaEdgesProperty);
bool ISafeAreaView2.HasExplicitSafeAreaEdges => SafeAreaElement.IsSafeAreaEdgesSet(this);

/// <inheritdoc cref="ISafeAreaView2.GetSafeAreaRegionsForEdge"/>
SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
{
// Check if the developer has explicitly set SafeAreaEdges
if (IsSet(SafeAreaEdgesProperty))
if (SafeAreaElement.IsSafeAreaEdgesSet(this))
{
// Developer has explicitly set SafeAreaEdges, use it directly
return SafeAreaEdges.GetEdge(edge);
Expand Down Expand Up @@ -206,7 +205,7 @@ SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
#endif
}

SafeAreaEdges ISafeAreaElement.SafeAreaEdgesDefaultValueCreator()
SafeAreaEdges ISafeAreaElement.GetDefaultSafeAreaEdges()
{
return SafeAreaEdges.None;
}
Expand Down
7 changes: 2 additions & 5 deletions src/Controls/src/Core/ContentView/ContentView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal override void SetChildInheritedBindingContext(Element child, object con

IView IContentView.PresentedContent => ((this as IControlTemplated).TemplateRoot as IView) ?? Content;

SafeAreaEdges ISafeAreaElement.SafeAreaEdgesDefaultValueCreator()
SafeAreaEdges ISafeAreaElement.GetDefaultSafeAreaEdges()
{
return SafeAreaEdges.None;
}
Expand All @@ -88,11 +88,8 @@ private protected override string GetDebuggerDisplay()
return $"{base.GetDebuggerDisplay()}, {contentText}";
}

/// <inheritdoc cref="ISafeAreaView2.SafeAreaInsets"/>
Thickness ISafeAreaView2.SafeAreaInsets { set { } } // Default no-op implementation for content views

/// <inheritdoc cref="ISafeAreaView2.HasExplicitSafeAreaEdges"/>
bool ISafeAreaView2.HasExplicitSafeAreaEdges => IsSetExplicitly(SafeAreaEdgesProperty);
bool ISafeAreaView2.HasExplicitSafeAreaEdges => SafeAreaElement.IsSafeAreaEdgesSet(this);

/// <inheritdoc cref="ISafeAreaView2.GetSafeAreaRegionsForEdge"/>
SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
Expand Down
7 changes: 2 additions & 5 deletions src/Controls/src/Core/Layout/Layout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Thickness IPaddingElement.PaddingDefaultValueCreator()
return new Thickness(0);
}

SafeAreaEdges ISafeAreaElement.SafeAreaEdgesDefaultValueCreator()
SafeAreaEdges ISafeAreaElement.GetDefaultSafeAreaEdges()
{
return SafeAreaEdges.Container;
}
Expand Down Expand Up @@ -409,11 +409,8 @@ private protected override string GetDebuggerDisplay()
}


/// <inheritdoc cref="ISafeAreaView2.SafeAreaInsets"/>
Thickness ISafeAreaView2.SafeAreaInsets { set { } } // Default no-op implementation for layouts

/// <inheritdoc cref="ISafeAreaView2.HasExplicitSafeAreaEdges"/>
bool ISafeAreaView2.HasExplicitSafeAreaEdges => IsSetExplicitly(SafeAreaEdgesProperty);
bool ISafeAreaView2.HasExplicitSafeAreaEdges => SafeAreaElement.IsSafeAreaEdgesSet(this);

/// <inheritdoc cref="ISafeAreaView2.GetSafeAreaRegionsForEdge"/>
SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
Expand Down
6 changes: 3 additions & 3 deletions src/Controls/src/Core/Page/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Microsoft.Maui.Controls
/// <remarks><see cref = "Page" /> is primarily a base class for more useful derived types. Objects that are derived from the <see cref="Page"/> class are most prominently used as the top level UI element in .NET MAUI applications. In addition to their role as the main pages of applications, <see cref="Page"/> objects and their descendants can be used with navigation classes, such as <see cref="NavigationPage"/> or <see cref="FlyoutPage"/>, among others, to provide rich user experiences that conform to the expected behaviors on each platform.
/// </remarks>
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
public partial class Page : VisualElement, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement, ISafeAreaView2, IView, ITitledElement, IToolbarElement, ISafeAreaView, IConstrainedView
public partial class Page : VisualElement, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement, ISafeAreaView2, ISafeAreaInsets, IView, ITitledElement, IToolbarElement, ISafeAreaView, IConstrainedView
#if IOS
,IiOSPageSpecifics
#endif
Expand Down Expand Up @@ -254,7 +254,7 @@ int IiOSPageSpecifics.PreferredStatusBarUpdateAnimationMode
#endif

/// <inheritdoc/>
Thickness ISafeAreaView2.SafeAreaInsets
Thickness ISafeAreaInsets.SafeAreaInsets
{
set
{
Expand Down Expand Up @@ -918,7 +918,7 @@ internal void SendNavigatedFrom(NavigatedFromEventArgs args, bool disconnectHand
}
}
#endif

if (!this.IsLoaded)
{
this.DisconnectHandlers();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
3 changes: 3 additions & 0 deletions src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#nullable enable
Microsoft.Maui.Controls.SafeAreaElement
static Microsoft.Maui.Controls.SafeAreaElement.IsSafeAreaEdgesSet(Microsoft.Maui.Controls.BindableObject! bindable) -> bool
static readonly Microsoft.Maui.Controls.SafeAreaElement.SafeAreaEdgesProperty -> Microsoft.Maui.Controls.BindableProperty!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDragStarting(Microsoft.Maui.Controls.View! element, System.Func<Microsoft.Maui.IElement?, Microsoft.Maui.Graphics.Point?>? getPosition = null, Microsoft.Maui.Controls.PlatformDragStartingEventArgs? platformArgs = null) -> Microsoft.Maui.Controls.DragStartingEventArgs!
Microsoft.Maui.Controls.DragGestureRecognizer.SendDropCompleted(Microsoft.Maui.Controls.DropCompletedEventArgs! args) -> void
Microsoft.Maui.Controls.DropGestureRecognizer.SendDragLeave(Microsoft.Maui.Controls.DragEventArgs! args) -> void
Expand Down
32 changes: 30 additions & 2 deletions src/Controls/src/Core/SafeAreaElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,45 @@

namespace Microsoft.Maui.Controls
{
internal static class SafeAreaElement
/// <summary>
/// Provides the shared bindable property used by controls that implement <see cref="ISafeAreaElement"/>.
/// </summary>
public static class SafeAreaElement
{
/// <summary>
/// The backing store for the <see cref="ISafeAreaElement.SafeAreaEdges" /> bindable property.
/// </summary>
/// <remarks>
/// Types using this property must implement <see cref="ISafeAreaElement"/> and should expose this instance through
/// their own public <c>SafeAreaEdgesProperty</c> field.
/// </remarks>
public static readonly BindableProperty SafeAreaEdgesProperty =
BindableProperty.Create(nameof(ISafeAreaElement.SafeAreaEdges), typeof(SafeAreaEdges), typeof(ISafeAreaElement), SafeAreaEdges.Default,
defaultValueCreator: SafeAreaEdgesDefaultValueCreator);
Comment thread
kubaflo marked this conversation as resolved.
Outdated

static object SafeAreaEdgesDefaultValueCreator(BindableObject bindable)
=> ((ISafeAreaElement)bindable).SafeAreaEdgesDefaultValueCreator();
{
if (bindable is not ISafeAreaElement safeAreaElement)
throw new InvalidOperationException($"{bindable.GetType()} must implement {nameof(ISafeAreaElement)} to use {nameof(SafeAreaEdgesProperty)}.");
Comment thread
kubaflo marked this conversation as resolved.

return safeAreaElement.GetDefaultSafeAreaEdges();
}

/// <summary>
/// Determines whether <see cref="SafeAreaEdgesProperty"/> has been explicitly configured on a bindable object.
/// </summary>
/// <param name="bindable">The bindable object to inspect.</param>
/// <returns><see langword="true"/> when a local value, style, binding, or other non-default value is applied; otherwise, <see langword="false"/>.</returns>
/// <remarks>
/// The type must use <see cref="SafeAreaEdgesProperty"/> as the backing store for its safe area property.
/// </remarks>
public static bool IsSafeAreaEdgesSet(BindableObject bindable)
{
if (bindable is null)
throw new ArgumentNullException(nameof(bindable));

return bindable.IsSetExplicitly(SafeAreaEdgesProperty);
}

/// <summary>
/// Gets the effective safe area behavior for a specific edge.
Expand Down
14 changes: 2 additions & 12 deletions src/Controls/src/Core/ScrollView/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,23 +550,13 @@ Size IContentView.CrossPlatformMeasure(double widthConstraint, double heightCons
Size IContentView.CrossPlatformArrange(Rect bounds) =>
((ICrossPlatformLayout)this).CrossPlatformArrange(bounds);

SafeAreaEdges ISafeAreaElement.SafeAreaEdgesDefaultValueCreator()
SafeAreaEdges ISafeAreaElement.GetDefaultSafeAreaEdges()
{
return SafeAreaEdges.Default;
}

/// <inheritdoc cref="ISafeAreaView2.SafeAreaInsets"/>
Thickness ISafeAreaView2.SafeAreaInsets
{
set
{
// For ScrollView, we don't need to store the SafeAreaInsets
// The platform-specific MauiScrollView handles this
}
}

/// <inheritdoc cref="ISafeAreaView2.HasExplicitSafeAreaEdges"/>
bool ISafeAreaView2.HasExplicitSafeAreaEdges => IsSetExplicitly(SafeAreaEdgesProperty);
bool ISafeAreaView2.HasExplicitSafeAreaEdges => SafeAreaElement.IsSafeAreaEdgesSet(this);

/// <inheritdoc cref="ISafeAreaView2.GetSafeAreaRegionsForEdge"/>
SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
Expand Down
Loading
Loading