diff --git a/src/Avalonia.Controls/Utils/GridLayout.cs b/src/Avalonia.Controls/Utils/GridLayout.cs
index e7a82addfd..6e38a7ceba 100644
--- a/src/Avalonia.Controls/Utils/GridLayout.cs
+++ b/src/Avalonia.Controls/Utils/GridLayout.cs
@@ -139,7 +139,7 @@ namespace Avalonia.Controls.Utils
///
/// The measured result that containing the desired size and all the column/row length.
///
- [NotNull]
+ [NotNull, Pure]
internal MeasureResult Measure(double containerLength)
{
// Prepare all the variables that this method needs to use.
@@ -290,7 +290,7 @@ namespace Avalonia.Controls.Utils
///
/// The measured result that containing the desired size and all the column/row length.
///
- [NotNull]
+ [NotNull, Pure]
public ArrangeResult Arrange(double finalLength, [CanBeNull] MeasureResult measure)
{
measure = measure ?? Measure(finalLength);