public override int GetItemViewType(int position) { var itemMap = GetItemMap(position); switch (itemMap.Type) { case ItemType.Header: case ItemType.Footer: return(ViewType.GetTarget(itemMap.Type, DefaultViewType)); case ItemType.Item: return(ViewType.GetTarget(itemMap.Type, OnGetItemViewType(itemMap.Item))); default: throw new ArgumentException($"Unable to get item view type for \"{position}\" position.", nameof(position)); } }