I wonder if it's possible to add/draw a coloured square/rectangle on the background of a list item. I made a sketch and added it to this post.
I've got the example projects but I couldn't find what I am looking for.
Many thanks in advance.
1 Answer, 1 is accepted
answered on 16 Jul 2015, 12:41 PM
Yes, it is possible to get the look from the design images you have send. You should use the TKListVIewDataSource protocol and implement its cellForItem method where you should customize each cell by adding a UIView with specific color and size to it. The code sample below demonstrates this:
public override TKListViewCell CellForItem (TKListView listView, NSIndexPath indexPath)
TKListViewCell cell = listView.DequeueReusableCell ("cell", indexPath) as TKListViewCell;
cell.TextLabel.Text = "Some text";
UIView line = new UIView (new CGRect (0, 0, 5, cell.BackgroundView.Bounds.Size.Height - 1));
line.BackgroundColor = UIColor.Red;
If you have any other questions feel free to contact us.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items