diff --git a/src/Avalonia.Controls.DataGrid/DataGridRows.cs b/src/Avalonia.Controls.DataGrid/DataGridRows.cs
index a69b8eafe1..4bfbd7d818 100644
--- a/src/Avalonia.Controls.DataGrid/DataGridRows.cs
+++ b/src/Avalonia.Controls.DataGrid/DataGridRows.cs
@@ -425,7 +425,7 @@ namespace Avalonia.Controls
UpdateDisplayedRows(DisplayData.FirstScrollingSlot, CellsHeight);
}
- if (DisplayData.FirstScrollingSlot < slot && DisplayData.LastScrollingSlot > slot)
+ if (DisplayData.FirstScrollingSlot < slot && (DisplayData.LastScrollingSlot > slot || DisplayData.LastScrollingSlot == -1))
{
// The row is already displayed in its entirety
return true;
diff --git a/src/Avalonia.Controls/GridLength.cs b/src/Avalonia.Controls/GridLength.cs
index b8418949d9..ee6a146d61 100644
--- a/src/Avalonia.Controls/GridLength.cs
+++ b/src/Avalonia.Controls/GridLength.cs
@@ -77,6 +77,12 @@ namespace Avalonia.Controls
///
public static GridLength Auto => new GridLength(0, GridUnitType.Auto);
+ ///
+ /// Gets an instance of that indicates that a row or column should
+ /// fill its content.
+ ///
+ public static GridLength Star => new GridLength(1, GridUnitType.Star);
+
///
/// Gets the unit of the .
///
diff --git a/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs b/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
index b0b52812b9..e3783febdd 100644
--- a/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
+++ b/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
@@ -511,8 +511,8 @@ namespace Avalonia.Controls.Presenters
else if (scrollable.IsLogicalScrollEnabled)
{
Viewport = scrollable.Viewport;
- Extent = scrollable.Extent;
Offset = scrollable.Offset;
+ Extent = scrollable.Extent;
}
}
diff --git a/src/Avalonia.Controls/RowDefinitions.cs b/src/Avalonia.Controls/RowDefinitions.cs
index 02ab12b5af..a5ed6ae09d 100644
--- a/src/Avalonia.Controls/RowDefinitions.cs
+++ b/src/Avalonia.Controls/RowDefinitions.cs
@@ -1,5 +1,4 @@
using System.Linq;
-using Avalonia.Collections;
namespace Avalonia.Controls
{
@@ -25,6 +24,11 @@ namespace Avalonia.Controls
AddRange(GridLength.ParseLengths(s).Select(x => new RowDefinition(x)));
}
+ public override string ToString()
+ {
+ return string.Join(",", this.Select(x => x.Height));
+ }
+
///
/// Parses a string representation of row definitions collection.
///
@@ -32,4 +36,4 @@ namespace Avalonia.Controls
/// The .
public static RowDefinitions Parse(string s) => new RowDefinitions(s);
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Visuals/Media/BoxShadow.cs b/src/Avalonia.Visuals/Media/BoxShadow.cs
index 69395fd3b8..50f75365b0 100644
--- a/src/Avalonia.Visuals/Media/BoxShadow.cs
+++ b/src/Avalonia.Visuals/Media/BoxShadow.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using System.Text;
using Avalonia.Animation.Animators;
using Avalonia.Utilities;
@@ -75,6 +76,46 @@ namespace Avalonia.Media
return rv;
}
}
+
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+
+ if (IsEmpty)
+ {
+ return "none";
+ }
+
+ if (IsInset)
+ {
+ sb.Append("inset");
+ }
+
+ if (OffsetX != 0.0)
+ {
+ sb.AppendFormat(" {0}", OffsetX.ToString());
+ }
+
+ if (OffsetY != 0.0)
+ {
+ sb.AppendFormat(" {0}", OffsetY.ToString());
+ }
+
+ if (Blur != 0.0)
+ {
+ sb.AppendFormat(" {0}", Blur.ToString());
+ }
+
+ if (Spread != 0.0)
+ {
+ sb.AppendFormat(" {0}", Spread.ToString());
+ }
+
+ sb.AppendFormat(" {0}", Color.ToString());
+
+ return sb.ToString();
+ }
+
public static unsafe BoxShadow Parse(string s)
{
if(s == null)
diff --git a/src/Avalonia.Visuals/Media/BoxShadows.cs b/src/Avalonia.Visuals/Media/BoxShadows.cs
index 9e4d6aacb0..810ac70b99 100644
--- a/src/Avalonia.Visuals/Media/BoxShadows.cs
+++ b/src/Avalonia.Visuals/Media/BoxShadows.cs
@@ -1,6 +1,6 @@
using System;
-using System.Collections.Generic;
using System.ComponentModel;
+using System.Text;
using Avalonia.Animation.Animators;
namespace Avalonia.Media
@@ -43,6 +43,24 @@ namespace Avalonia.Media
}
}
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+
+ if (Count == 0)
+ {
+ return "none";
+ }
+
+ foreach (var boxShadow in this)
+ {
+ sb.AppendFormat("{0} ", boxShadow.ToString());
+ }
+
+ return sb.ToString();
+
+ }
+
[EditorBrowsable(EditorBrowsableState.Never)]
public struct BoxShadowsEnumerator
{