icon select
This commit is contained in:
@ -8,8 +8,8 @@ namespace Billing.UI
|
||||
public class WrapLayout : Layout<View>
|
||||
{
|
||||
public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create(nameof(ItemsSource), typeof(IList), typeof(WrapLayout), propertyChanged: OnItemsSourcePropertyChanged);
|
||||
public static readonly BindableProperty ColumnSpacingProperty = BindableProperty.Create(nameof(ColumnSpacing), typeof(double), typeof(WrapLayout), defaultValue: 5.0, propertyChanged: (obj, _, _) => ((WrapLayout)obj).InvalidateLayout());
|
||||
public static readonly BindableProperty RowSpacingProperty = BindableProperty.Create(nameof(RowSpacing), typeof(double), typeof(WrapLayout), defaultValue: 5.0, propertyChanged: (obj, _, _) => ((WrapLayout)obj).InvalidateLayout());
|
||||
public static readonly BindableProperty ColumnSpacingProperty = BindableProperty.Create(nameof(ColumnSpacing), typeof(double), typeof(WrapLayout), defaultValue: 4d, propertyChanged: (obj, _, _) => ((WrapLayout)obj).InvalidateLayout());
|
||||
public static readonly BindableProperty RowSpacingProperty = BindableProperty.Create(nameof(RowSpacing), typeof(double), typeof(WrapLayout), defaultValue: 4d, propertyChanged: (obj, _, _) => ((WrapLayout)obj).InvalidateLayout());
|
||||
|
||||
private static void OnItemsSourcePropertyChanged(BindableObject obj, object old, object @new)
|
||||
{
|
||||
@ -177,14 +177,14 @@ namespace Billing.UI
|
||||
{
|
||||
cellSize.Width = (width - columnSpacing * (columns - 1)) / columns;
|
||||
}
|
||||
if (double.IsPositiveInfinity(height))
|
||||
//if (double.IsPositiveInfinity(height))
|
||||
{
|
||||
cellSize.Height = maxChildSize.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellSize.Height = (height - RowSpacing * (rows - 1)) / rows;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// cellSize.Height = (height - RowSpacing * (rows - 1)) / rows;
|
||||
//}
|
||||
layoutData = new LayoutData(visibleChildrenCount, cellSize, rows, columns);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user