Unplanned
Last Updated: 29 May 2024 14:46 by Martin Ivanov
Martin Ivanov
Created on: 29 May 2024 14:46
Category: TileList
Type: Bug Report
1
TileList: KeyNotFoundException is thrown when the TileGroup DisplayIndex is set to a value outside of the groups count

KeyNotFoundException occurs when you assing the DisplayIndex of a tile group to a value bigger than the groups' count. For example, when you have 3 groups and set the DisplayIndex to 3 or more. If such situation occur it would be expected for the tile list to coerce the value to the closest available index. Similar to how the WPF native attached Grid.Row and Grid.Column properties work.

Exceptions message: KeyNotFoundException: 'The given key '0' was not present in the dictionary.'

  System.Private.CoreLib.dll!System.ThrowHelper.ThrowKeyNotFoundException<int>(int key) Unknown
  System.Private.CoreLib.dll!System.Collections.Generic.Dictionary<int, int>.this[int].get(int key) Unknown
> Telerik.Windows.Controls.dll!Telerik.Windows.Controls.RadTileList.InitializeGroupDisplayIndexes() Line 273 C#
  Telerik.Windows.Controls.dll!Telerik.Windows.Controls.RadTileList.GenerateTileGroups(System.Collections.ObjectModel.ReadOnlyObservableCollection<object> groupsCollection) Line 300 C#
  Telerik.Windows.Controls.dll!Telerik.Windows.Controls.RadTileList.AutoGenerateTiles() Line 690 C#
  Telerik.Windows.Controls.dll!Telerik.Windows.Controls.RadTileList.ResetItemsOnItemsChanged() Line 650 C#
  Telerik.Windows.Controls.dll!Telerik.Windows.Controls.RadTileList.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) Line 616 C#
  PresentationFramework.dll!System.Windows.Data.CollectionView.OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) Unknown
  WindowsBase.dll!System.Windows.WeakEventManager.ListenerList<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.DeliverEvent(object sender, System.EventArgs e, System.Type managerType) Unknown
  WindowsBase.dll!System.Windows.WeakEventManager.DeliverEvent(object sender, System.EventArgs args) Unknown
  PresentationFramework.dll!System.Windows.Data.CollectionView.OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) Unknown
  PresentationFramework.dll!System.Windows.Data.ListCollectionView.RefreshOverride() Unknown
  PresentationFramework.dll!System.Windows.Data.CollectionView.RefreshInternal() Unknown
  PresentationFramework.dll!System.Windows.Data.CollectionView.DeferHelper.Dispose() Unknown
  PresentationFramework.dll!System.Windows.Controls.ItemCollection.SetCollectionView(System.Windows.Data.CollectionView view) Unknown
  PresentationFramework.dll!System.Windows.Controls.ItemsControl.OnItemsSourceChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e) Unknown
  PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown
  WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown

0 comments