diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 1731884..b48836a 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -5,7 +5,7 @@
Using SkiaSharp 2.xx. Checkout the DrawnUi Sandbox project for usage example.
- 1.2.3.2
+ 1.2.3.3
diff --git a/src/Engine/Draw/Layout/SkiaLayout.ColumnRow.cs b/src/Engine/Draw/Layout/SkiaLayout.ColumnRow.cs
index 2c6e4b2..95429d2 100644
--- a/src/Engine/Draw/Layout/SkiaLayout.ColumnRow.cs
+++ b/src/Engine/Draw/Layout/SkiaLayout.ColumnRow.cs
@@ -299,7 +299,10 @@ public virtual ScaledSize MeasureStack(SKRect rectForChildrenPixels, float scale
}
var maybeSecondPass = Type == LayoutType.Row &&
- (float.IsInfinity(rectForChild.Bottom) || float.IsInfinity(rectForChild.Top));
+ (float.IsInfinity(rectForChild.Bottom) || float.IsInfinity(rectForChild.Top))
+ || Type == LayoutType.Column &&
+ (float.IsInfinity(rectForChild.Right) || float.IsInfinity(rectForChild.Left));
+
List listSecondPass = new();
//measure
@@ -391,6 +394,10 @@ public virtual ScaledSize MeasureStack(SKRect rectForChildrenPixels, float scale
else
{
measured = MeasureAndArrangeCell(rectFitChild, cell, child, scale);
+ if (child.Tag == "First")
+ {
+ var stop = 1;
+ }
if (maybeSecondPass) //has infinity in destination
{
if (Type == LayoutType.Column && child.HorizontalOptions != LayoutOptions.Start)
diff --git a/src/Engine/Draw/SkiaControl.cs b/src/Engine/Draw/SkiaControl.cs
index 71c86cf..ccb5bb8 100644
--- a/src/Engine/Draw/SkiaControl.cs
+++ b/src/Engine/Draw/SkiaControl.cs
@@ -5015,7 +5015,6 @@ protected virtual bool UseRenderingObject(SkiaDrawingContext context, SKRect rec
RenderObjectPreviousNeedsUpdate = false;
if (kill != null)
{
-
Tasks.StartDelayed(TimeSpan.FromSeconds(3.5), () =>
{
kill.Dispose();
@@ -5531,13 +5530,8 @@ void draw(SkiaDrawingContext context)
if (RenderObject != null && UsingCacheType != SkiaCacheType.ImageDoubleBuffered)
{
- //RenderObject = null;
- throw new Exception("RenderObject already exists for CreateRenderingObjectAndPaint! Need to dispose and assign null to it before.");
- }
-
- if (IsCacheImage && !WillClipBounds)
- {
- throw new Exception("WillClipBounds is required to be TRUE for caching as image.");
+ //we might come here with an existing RenderingObject if UseRenderingObject returned False
+ RenderObject = null;
}
RenderObjectNeedsUpdate = false;
@@ -5556,6 +5550,12 @@ void draw(SkiaDrawingContext context)
}
var created = CreateRenderingObject(context, recordingArea, oldObject, action);
+
+ if (created == null)
+ {
+ return;
+ }
+
if (oldObject != null)
{
if (created.SurfaceIsRecycled)