diff --git a/src/Controls/src/Core/Border/Border.cs b/src/Controls/src/Core/Border/Border.cs index 570f1c93d1e0..8cfeac05a0d1 100644 --- a/src/Controls/src/Core/Border/Border.cs +++ b/src/Controls/src/Core/Border/Border.cs @@ -65,7 +65,14 @@ void NotifyStrokeShapeChanges() if (strokeShape is VisualElement visualElement) { AddLogicalChild(visualElement); - _strokeShapeChanged ??= (sender, e) => OnPropertyChanged(nameof(StrokeShape)); + _strokeShapeChanged ??= (sender, e) => + { + if (e.PropertyName != nameof(Window) && + e.PropertyName != nameof(Parent)) + { + OnPropertyChanged(nameof(StrokeShape)); + } + }; _strokeShapeProxy ??= new(); _strokeShapeProxy.Subscribe(visualElement, _strokeShapeChanged); }