All parts of the TreeViewItem (indicator, text, checkbox) are defined as one big template. Therefore customization of only one part of the template still requires retemplating the whole item.
When retemplating is applied to the treeviewitem and 20+ children in the nodes are loaded, the result is as follow: If you run that on iOS and expand a node you'll see that it crunches the UI for a few seconds and then loads the child nodes, but i also see on our application that it will crash some times and either way gives a bad feel to the UI on iOS
ExpandCollapse Indicator is still visible when deleting all children of a branch
Workaround:
Reser the TreeView ItemsSource
This freezing is not happening if we have less number of records, I have tested
with 20 records. But it may load more than 20 records, I do not have the exact number
where this freezing issue starts to happen.
The issue happens when item template is used.
workaround:
Remove the item template
When we call ScrollItemIntoView to scroll to one of the nodes at the bottom of the tree the app will crash with a "Unspecified Error".
I've set it to load 150 nodes into the tree and when you click the "Test" button it will error (using UWP). If you change it to only load 100 nodes or less it should work.
I am using treeview loadondemand, doing an api call for every node that I open. I noticed that when I tried to open an item with 33 children object, it hangs the application.
The issue occurs when TreeViewItemTemplate is used.
Without the itemtemplate no issues.
Above the TreeView there is a Telerik.SegmentedControl, with two segments. If I click on one of the segments the ItemsSource of the TreeView gets updated by using .Add() or Remove() of the ObservableCollection.
If every Segment is called for the first time there is no problem. But if I want to clear all Items and display the empty treeView I get the following Exception.
Java.Lang.IndexOutOfBoundsException: 'Inconsistency detected. Invalid item position 0(offset:-1).state:14 md5a5af569a83c1a3f5c3a8a63bd7d39860.RadExtendedListView{c6376f1 VFED..... ........ 0,0-1200,840 #5}, adapter:com.telerik.widget.list.ListViewWrapperAdapter@b30041b, layout:android.support.v7.widget.LinearLayoutManager@3fd42d6, context:md5db22775bb305bf9756607f4261793d51.MainActivity@1d6cd4f
Scrolling a TreeView with expandable items on iOS causes items to randomly change position in the control and prevent items from being selected.
This renders the control unusable on iOS when expandable items are present.
I've attached a basic project that demonstrates the issue.
The project just needs the latest Telerik binaries added to it. They were too large to include.
I believe this is the same issue Martin was experiencing in the comments of https://feedback.telerik.com/xamarin/1427193-treeview-ios-wrong-visualization-with-custom-itemtemplate
The documentation notes that the TreeView should have its items default as IsExpanded=False, however, everything is expanded when I start my TreeView. This also includes the situation when I have a TreeView with a custom template (provided by the excellent people at Telerik, for dealing with cutoff expander icon issue!) and if I try to set Expanded explicitly to False via the template and viewmodel.
This seems to be pretty basic and I have to wonder if I'm not doing something correctly.
Thanks.
Currently this could be accomplished through methods.