diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2016-12-21 15:15:35 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2016-12-21 15:15:35 -0800 |
commit | aa0cf74ac39c66c43c7440c2cde88461ab7b196f (patch) | |
tree | 9c350658be751d67a82a8cfc37b5ba0c76b9cb3d | |
parent | 5e4b7f8cfc9f7fcb8f38142689795aae03021284 (diff) | |
parent | f11633b67dad5950ceb83935c17f1bfd2305dbeb (diff) | |
download | xamarin-forms-aa0cf74ac39c66c43c7440c2cde88461ab7b196f.tar.gz xamarin-forms-aa0cf74ac39c66c43c7440c2cde88461ab7b196f.tar.bz2 xamarin-forms-aa0cf74ac39c66c43c7440c2cde88461ab7b196f.zip |
Merge "Homogenous mode should be set to false if grouping is enabled" into tizen
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Native/ListView.cs | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/ListView.cs b/Xamarin.Forms.Platform.Tizen/Native/ListView.cs index d5531dc4..e932a28e 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/ListView.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/ListView.cs @@ -85,10 +85,32 @@ namespace Xamarin.Forms.Platform.Tizen.Native GenItemClass _headerFooterItemClass = null; /// <summary> + /// Indicates if the list view has uneven rows. + /// </summary> + bool _hasUnevenRows = false; + + /// <summary> + /// Indicates if grouping in the list view is enabled. + /// </summary> + bool _isGroupingEnabled = false; + + /// <summary> /// Gets or sets a value indicating whether this instance has grouping enabled. /// </summary> /// <value><c>true</c> if this instance has grouping enabled.</value> - public bool IsGroupingEnabled { get; set; } + public bool IsGroupingEnabled + { + get + { + return _isGroupingEnabled; + } + + set + { + _isGroupingEnabled = value; + UpdateHomogeneousMode(); + } + } /// <summary> /// Constructor of ListView native control. @@ -124,7 +146,8 @@ namespace Xamarin.Forms.Platform.Tizen.Native /// <param name="hasUnevenRows">If <c>true</c>, the list will allow uneven sizes for its rows.</param> public void SetHasUnevenRows(bool hasUnevenRows) { - Homogeneous = !hasUnevenRows; + _hasUnevenRows = hasUnevenRows; + UpdateHomogeneousMode(); UpdateRealizedItems(); } @@ -597,5 +620,13 @@ namespace Xamarin.Forms.Platform.Tizen.Native } return _headerFooterItemClass; } + + /// <summary> + /// Updates the homogeneous mode of the list view. + /// </summary> + void UpdateHomogeneousMode() + { + Homogeneous = !_hasUnevenRows && !_isGroupingEnabled; + } } } |