There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
TreeView recursive data binding
It looks like that there is an error for the situation when we map same type to its own children.
For example, for type of sort :
public class Category
when we map
mappings.For<Category>(x => x.ItemDataBound((control, item) =>
control.Text = item.Name;
}).Children(category => category.Children));
we get StackOverflowException, even though collection of categories itself may be perfectly valid tree (for example, even when Children collection for each passed element is empty).
For different types, mapping works well, but not for the same type as it looks like.