diff options
author | Pawel Andruszkiewicz <p.andruszkie@samsung.com> | 2016-12-21 08:28:05 +0100 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-02-03 13:26:49 +0900 |
commit | 5340a920c4a90a5e7386ed8f16b2222e8503c967 (patch) | |
tree | 16d9018521826b72a117a1f00da1bfce404c7ad3 | |
parent | 026abe897119c5e361c77ccb20077f22220175bf (diff) | |
download | xamarin-forms-5340a920c4a90a5e7386ed8f16b2222e8503c967.tar.gz xamarin-forms-5340a920c4a90a5e7386ed8f16b2222e8503c967.tar.bz2 xamarin-forms-5340a920c4a90a5e7386ed8f16b2222e8503c967.zip |
Homogenous mode should be set to false if grouping is enabled
Change-Id: I01327d4c0be6847445c4711d5c4cb6f60f3ba6a9
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
-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; + } } } |