Skip to content

Commit 6917682

Browse files
committed
Update PropertyPropagationExtensions.cs
1 parent e8dd2e6 commit 6917682

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ internal static void PropagatePropertyChanged(string propertyName, Element eleme
2828
if (propertyName == null || propertyName == Shell.NavBarIsVisibleProperty.PropertyName)
2929
BaseShellItem.PropagateFromParent(Shell.NavBarIsVisibleProperty, element);
3030

31-
for (int i = 0; i < children.ToList().Count; i++)
31+
foreach (var view in children.ToList().OfType<IPropertyPropagationController>())
3232
{
33-
if (children[i] is IPropertyPropagationController view)
34-
{
35-
view.PropagatePropertyChanged(propertyName);
36-
}
33+
view.PropagatePropertyChanged(propertyName);
3734
}
3835
}
3936

0 commit comments

Comments
 (0)