This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
At one point in my application, I am inserting an item in the Multicolumn Treeview control and need it to scroll into view. Could you please let me know if that's possible? The new item is not always necessarily at the bottom of the tree. |
|
|
If you are inserting a MulticolumnTreeViewItem directly, call BringIntoView on that item. If you are data-binding the ItemsSource and adding an item to the underlying collection, you will first need to get a reference to the generated UI element, then call BringIntoView on that: // Here mctv is the MulticolumnTreeView and dataItem is the item added to the ItemsSource Watch out because WPF may not create the UI element immediately. You may need to use Dispatcher.BeginInvoke to defer the above code until the element is ready, or you may be able to use the ItemContainerGenerated events to detect when the element has been created. (I haven't tested this so you may need to experiment a bit.) |
|