Skip to content
Merged
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions src/Controls/src/Core/Internals/PropertyPropagationExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable disable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -8,6 +9,15 @@ namespace Microsoft.Maui.Controls.Internals
/// <include file="../../../docs/Microsoft.Maui.Controls.Internals/PropertyPropagationExtensions.xml" path="Type[@FullName='Microsoft.Maui.Controls.Internals.PropertyPropagationExtensions']/Docs/*" />
public static class PropertyPropagationExtensions
{
[Obsolete]
internal static void PropagatePropertyChanged(string propertyName, Element element, IEnumerable children)
{
if (children == null)
return;

PropagatePropertyChanged(propertyName, element, children.OfType<IVisualTreeElement>().ToList());
}

internal static void PropagatePropertyChanged(string propertyName, Element element, IReadOnlyList<IVisualTreeElement> children)
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove internal from this one?

Copy link
Contributor

@pictos pictos Mar 18, 2025

Choose a reason for hiding this comment

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

removing the internal would force this to be merged on .net 10, no?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, this will have to go into net10.

But, is there a reason for this to be IReadOnlyList instead of IEnumerable <IVisualTreeElement>? The result is the same as we are just calling ToArray

Copy link
Member

Choose a reason for hiding this comment

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

I see all the other overloads take Element, so why does this need to be IVisualTreeElement?

{
if (propertyName == null || propertyName == VisualElement.FlowDirectionProperty.PropertyName)
Expand Down