Hi there,
I'm using RadTreeView with MVVM pattern, hierarchical templates, template selectors and everything works great! However, as soon as I set one of your predefined themes to the treeview, any attempt to add new item (new viewmodel object) ends up with the exception listed below. I was hoping that you could have some experience with this issue? And one more thing, is there any way to turn off the virtualization? Setting the IsVirtualizing property to False didn't seem to have any effect here...
Thanks in advance,
Petr
System.InvalidOperationException: A VirtualizingPanel is not nested in an ItemsControl. VirtualizingPanel must be nested in ItemsControl to get and show items.
at System.Windows.Controls.VirtualizingPanel.getGenerator()
at System.Windows.Controls.VirtualizingPanel.get_ItemContainerGenerator()
at Telerik.Windows.Controls.TreeView.TreeViewPanel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.VirtualizingPanel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.VirtualizingPanel.OnItemsChangedHandler(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.Primitives.ItemsChangedEventHandler.Invoke(Object sender, ItemsChangedEventArgs e)
at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index, Boolean suppressEvent)
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.ItemCollection.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at FddGrid.ViewModels.MainViewModel.AddComponent(Object component)
I'm using RadTreeView with MVVM pattern, hierarchical templates, template selectors and everything works great! However, as soon as I set one of your predefined themes to the treeview, any attempt to add new item (new viewmodel object) ends up with the exception listed below. I was hoping that you could have some experience with this issue? And one more thing, is there any way to turn off the virtualization? Setting the IsVirtualizing property to False didn't seem to have any effect here...
Thanks in advance,
Petr
System.InvalidOperationException: A VirtualizingPanel is not nested in an ItemsControl. VirtualizingPanel must be nested in ItemsControl to get and show items.
at System.Windows.Controls.VirtualizingPanel.getGenerator()
at System.Windows.Controls.VirtualizingPanel.get_ItemContainerGenerator()
at Telerik.Windows.Controls.TreeView.TreeViewPanel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.VirtualizingPanel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.VirtualizingPanel.OnItemsChangedHandler(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.Primitives.ItemsChangedEventHandler.Invoke(Object sender, ItemsChangedEventArgs e)
at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index, Boolean suppressEvent)
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.ItemCollection.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at FddGrid.ViewModels.MainViewModel.AddComponent(Object component)