Skip to content

Commit

Permalink
set MeasureFirstItem as default
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed Oct 5, 2024
1 parent 3ee2fd3 commit f9b21e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Maui.DataGrid/DataGrid.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<local:DataGridHeaderRow Grid.Row="0" x:Name="_headerRow" DataGrid="{Reference self}" HeightRequest="{Binding HeaderHeight, Source={Reference self}}" />
<RefreshView Grid.Row="1" x:Name="_refreshView" Grid.RowSpan="2" Command="{Binding PullToRefreshCommand, Source={Reference self}}" CommandParameter="{Binding PullToRefreshCommandParameter, Source={Reference self}}"
RefreshColor="{Binding RefreshColor, Source={Reference self}}" IsRefreshing="{Binding IsRefreshing, Source={Reference self}, Mode=TwoWay}" IsEnabled="{Binding RefreshingEnabled, Source={Reference self}}">
<!-- Set all platforms to use MeasureFirstItem when this bug is resolved https://github.com/dotnet/maui/issues/7562 -->
<CollectionView
x:Name="_collectionView"
BackgroundColor="{Binding BackgroundColor, Source={Reference self}}"
Expand Down
4 changes: 2 additions & 2 deletions Maui.DataGrid/DataGrid.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public partial class DataGrid
/// Gets or sets the ItemSizingStrategy for the data grid.
/// </summary>
public static readonly BindableProperty ItemSizingStrategyProperty =
BindablePropertyExtensions.Create<DataGrid, ItemSizingStrategy>(DeviceInfo.Platform == DevicePlatform.Android ? ItemSizingStrategy.MeasureAllItems : ItemSizingStrategy.MeasureFirstItem);
BindablePropertyExtensions.Create<DataGrid, ItemSizingStrategy>(ItemSizingStrategy.MeasureFirstItem);

/// <summary>
/// Gets or sets the row to edit.
Expand Down Expand Up @@ -767,7 +767,7 @@ public Color BorderColor

/// <summary>
/// Gets or sets <see cref="ItemSizingStrategy"/>
/// Default Value is <see cref="ItemSizingStrategy.MeasureFirstItem"/>, except on Android.
/// Default Value is <see cref="ItemSizingStrategy.MeasureFirstItem"/>.
/// </summary>
public ItemSizingStrategy ItemSizingStrategy
{
Expand Down

0 comments on commit f9b21e2

Please sign in to comment.