Skip to content

Commit

Permalink
Merge branch 'fix-9135' of github.com:dotnet/maui into fix-9135
Browse files Browse the repository at this point in the history
  • Loading branch information
hartez committed May 8, 2023
2 parents f88c872 + 2808c60 commit 1b6a857
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public override Size GetDesiredSize(double widthConstraint, double heightConstra
// If contentSize does have a value, our target size is the smaller of it and the constraints

size.Width = contentSize.Width <= widthConstraint ? contentSize.Width : widthConstraint;
size.Height = contentSize.Height <= heightConstraint ? contentSize.Height: heightConstraint;
size.Height = contentSize.Height <= heightConstraint ? contentSize.Height : heightConstraint;

var virtualView = this.VirtualView as IView;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public override void ViewWillLayoutSubviews()
LayoutEmptyView();
}

void InvalidateMeasureIfContentSizeChanged()
void InvalidateMeasureIfContentSizeChanged()
{
var contentSize = CollectionView.CollectionViewLayout.CollectionViewContentSize;

Expand All @@ -205,7 +205,7 @@ void InvalidateMeasureIfContentSizeChanged()
{
invalidate = true;
}

if (contentSize.Height < screenHeight || contentSize.Height < screenHeight)
{
invalidate = true;
Expand All @@ -220,7 +220,7 @@ void InvalidateMeasureIfContentSizeChanged()
_previousContentSize = contentSize;
}

internal Size? GetSize()
internal Size? GetSize()
{
if (_emptyViewDisplayed)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Microsoft.Maui.Controls;
using System.Collections.Generic;
using Microsoft.Maui.Controls;
using Xunit.Abstractions;

namespace Microsoft.Maui.DeviceTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Handlers.Items;
using Microsoft.Maui.DeviceTests.Stubs;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Hosting;
using Xunit;
using System.Collections.Generic;
using Microsoft.Maui.Graphics;
using Xunit.Abstractions;

namespace Microsoft.Maui.DeviceTests
Expand Down Expand Up @@ -135,7 +135,7 @@ public async Task CollectionViewCanSizeToContent(CollectionViewSizingTestCase te
for (int n = 0; n < itemCounts.Length; n++)
{
int itemsCount = itemCounts[n];
GenerateItems(itemsCount, data);
collectionView.ItemsSource = data;
Expand All @@ -149,7 +149,7 @@ public async Task CollectionViewCanSizeToContent(CollectionViewSizingTestCase te
double expectedHeight = layoutOptions == LayoutOptions.Fill
? containerHeight
: Math.Min(itemsCount * templateHeight, containerHeight);
if (itemsLayout.Orientation == ItemsLayoutOrientation.Horizontal)
{
Assert.Equal(expectedWidth, collectionView.Width, tolerance);
Expand Down

0 comments on commit 1b6a857

Please sign in to comment.