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
- {
- return _isGroupingEnabled;
- }
-
- set
- {
- _isGroupingEnabled = value;
- UpdateHomogeneousMode();
- }
- }
+ public bool IsGroupingEnabled { get; set; }
/// <summary>
/// Constructor of ListView native control.
/// <param name="hasUnevenRows">If <c>true</c>, the list will allow uneven sizes for its rows.</param>
public void SetHasUnevenRows(bool hasUnevenRows)
{
- _hasUnevenRows = hasUnevenRows;
- UpdateHomogeneousMode();
+ Homogeneous = !hasUnevenRows;
UpdateRealizedItems();
}
}
return _headerFooterItemClass;
}
-
- /// <summary>
- /// Updates the homogeneous mode of the list view.
- /// </summary>
- void UpdateHomogeneousMode()
- {
- Homogeneous = !_hasUnevenRows && !_isGroupingEnabled;
- }
}
}