Skip to content

Commit 773ba83

Browse files
committed
Update PropertyPropagationExtensions.cs
1 parent 6552e4f commit 773ba83

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Controls/src/Core/Internals/PropertyPropagationExtensions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ namespace Microsoft.Maui.Controls.Internals
99
public static class PropertyPropagationExtensions
1010
{
1111
internal static void PropagatePropertyChanged(string propertyName, Element element, IEnumerable children)
12+
{
13+
if (children == null)
14+
return;
15+
16+
PropagatePropertyChanged(propertyName, element, children.OfType<IVisualTreeElement>().ToList());
17+
}
18+
19+
internal static void PropagatePropertyChanged(string propertyName, Element element, IReadOnlyList<IVisualTreeElement> children)
1220
{
1321
if (propertyName == null || propertyName == VisualElement.FlowDirectionProperty.PropertyName)
1422
SetFlowDirectionFromParent(element);
@@ -28,7 +36,7 @@ internal static void PropagatePropertyChanged(string propertyName, Element eleme
2836
if (propertyName == null || propertyName == Shell.NavBarIsVisibleProperty.PropertyName)
2937
BaseShellItem.PropagateFromParent(Shell.NavBarIsVisibleProperty, element);
3038

31-
foreach (var child in children.OfType<IVisualTreeElement>().ToArray())
39+
foreach (var child in children.ToArray())
3240
{
3341
if (child is IPropertyPropagationController view)
3442
{

0 commit comments

Comments
 (0)