@@ -14,19 +14,24 @@ public partial class UniformItemsLayout : Layout, IUniformItemsLayout
1414 /// <summary>
1515 /// Gets or sets the maximum number of rows to display or process.
1616 /// </summary>
17- [ BindableProperty ( PropertyChangedMethodName = nameof ( OnMaxRowsProperChanged ) ) ]
17+ [ BindableProperty ( PropertyChangingMethodName = nameof ( OnMaxRowsPropertyChanging ) ) ]
1818 public partial int MaxRows { get ; set ; } = UniformItemLayoutDefaults . MaxRows ;
1919
2020 /// <summary>
2121 /// Gets or sets the maximum number of columns to display in the layout.
2222 /// </summary>
23- /// <remarks>Set this property to limit the number of columns arranged by the layout. The value must be greater
23+ /// <remarks>
24+ /// Set this property to limit the number of columns arranged by the layout. The value must be greater
2425 /// than or equal to 1. The default value is <see cref="int.MaxValue"/>, which allows an unlimited number of
25- /// columns.</remarks>
26- [ BindableProperty ( PropertyChangedMethodName = nameof ( OnMaxColumnsProperChanged ) ) ]
26+ /// columns.
27+ /// </remarks>
28+ [ BindableProperty ( PropertyChangingMethodName = nameof ( OnMaxColumnsPropertyChanging ) ) ]
2729 public partial int MaxColumns { get ; set ; } = UniformItemLayoutDefaults . MaxColumns ;
30+
31+ /// <inheritdoc />
32+ protected override ILayoutManager CreateLayoutManager ( ) => new UniformItemsLayoutManager ( this ) ;
2833
29- static void OnMaxRowsProperChanged ( BindableObject bindable , object oldValue , object newValue )
34+ static void OnMaxRowsPropertyChanging ( BindableObject bindable , object oldValue , object newValue )
3035 {
3136 var maxRows = ( int ) newValue ;
3237 if ( maxRows < 1 )
@@ -35,15 +40,12 @@ static void OnMaxRowsProperChanged(BindableObject bindable, object oldValue, obj
3540 }
3641 }
3742
38- static void OnMaxColumnsProperChanged ( BindableObject bindable , object oldValue , object newValue )
43+ static void OnMaxColumnsPropertyChanging ( BindableObject bindable , object oldValue , object newValue )
3944 {
4045 var maxColumns = ( int ) newValue ;
4146 if ( maxColumns < 1 )
4247 {
4348 throw new ArgumentOutOfRangeException ( nameof ( newValue ) , newValue , $ "{ nameof ( MaxColumns ) } must be greater or equal to 1.") ;
4449 }
4550 }
46-
47- /// <inheritdoc />
48- protected override ILayoutManager CreateLayoutManager ( ) => new UniformItemsLayoutManager ( this ) ;
4951}
0 commit comments