We have set the BringIntoViewMode to HeaderAndItems for a particular case and the result is not what I expect. Am I doing something wrong or is there a problem with the TreeView?
In an adapter (as we are building an MVVM application) we attach a handler to the ItemPrepared and LoadOnDemand events.
Originally it seemed logical to simply do the following in the LoadOnDemand event handler:
But of course should fail since technically the child nodes are not yet loaded.
Than I tried adding the following code to the ItemPrepared event handler:
This of course brings each child node into view as they are being "prepared", so that is also not the desired result. So finally I ended up with:
e.PreparedItem.ParentItem.BringIntoView();
But again no "items" were brought into view (even though in the ItemPrepared event the above code is called for each child node prepared).
Please let me know what I'm doing wrong!
Regards,
Roland
In an adapter (as we are building an MVVM application) we attach a handler to the ItemPrepared and LoadOnDemand events.
Originally it seemed logical to simply do the following in the LoadOnDemand event handler:
var treeViewItem = (RadTreeViewItem) e.OriginalSource;
treeViewItem.BringIntoView();
But of course should fail since technically the child nodes are not yet loaded.
Than I tried adding the following code to the ItemPrepared event handler:
e.PreparedItem.BringIntoView();
This of course brings each child node into view as they are being "prepared", so that is also not the desired result. So finally I ended up with:
e.PreparedItem.ParentItem.BringIntoView();
But again no "items" were brought into view (even though in the ItemPrepared event the above code is called for each child node prepared).
Please let me know what I'm doing wrong!
Regards,
Roland