This is a migrated thread and some comments may be shown as answers.

Exception in TileView

6 Answers 48 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 07 Apr 2011, 09:50 AM
Hi,

Since upgrading to q1 2011, I sometimes get this exception in the tileview:

MS.Internal.WrappedException: The given key was not present in the dictionary. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Telerik.Windows.Controls.TileView.PositionToIndexDictionary.GetPositionFromIndex(Int32 index)
   at Telerik.Windows.Controls.RadTileView.UpdatePositions()
   at Telerik.Windows.Controls.RadTileView.OnVisibilityChanged(RadTileViewItem container)
   at Telerik.Windows.Controls.RadTileView.PrepareContainerForItemOverride(DependencyObject element, Object item)
   at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
   at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
   at Telerik.Windows.Controls.TileViewPanel.RealizeMaximizedItem()
   at Telerik.Windows.Controls.TileViewPanel.MeasureNonRestoredChildren()
   at Telerik.Windows.Controls.TileViewPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
   --- End of inner exception stack trace ---

Any idea what's going on?

Thanks

6 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 07 Apr 2011, 11:12 AM
Hi Adrian,

 We are aware of this problem and we hope that we've fixed it in our latest internal build so if you want you can download it( 2011_1_0405 ) and see if this problem occurs again or you can wait until the official SP1 release which is scheduled for April the 14th.

Best wishes,
Zarko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ken
Top achievements
Rank 1
answered on 07 Apr 2011, 11:53 AM
Hi Zarko,

Just tried 0405: it doesn't throw an exception anymore, but it doesn't work properly either. Instead of 3 tile view items only one is loaded, and when I try to minimize it half of it will just fly off-screen :(

Please let me know when you have a fix for this, even if it's a internal build.

Thanks,
Adrian
0
Zarko
Telerik team
answered on 07 Apr 2011, 12:11 PM
Hi Adrian,

 Could you please send us a project that reproduces this issue so that we could investigate it, give you a work around and fix it for our next internal release(or for the SP1 if it is a bigger problem)?

All the best,
Zarko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ken
Top achievements
Rank 1
answered on 07 Apr 2011, 12:55 PM
Hi Zarko,

You can repro the issue by creating a simple SL4 application and in MainPage.Xaml:

		<telerik:RadTileView MinimizedColumnWidth="300" MaximizeMode="One" MinimizedItemsPosition="Left" x:Name="tileView">
			
		</telerik:RadTileView>

And in the codebehind:
public partial class MainPage : UserControl
	{
		public MainPage()
		{
			// Required to initialize variables
			InitializeComponent();
 
            tileView.Loaded += new RoutedEventHandler(tileView_Loaded);
		}
 
        void tileView_Loaded(object sender, RoutedEventArgs e)
        {
            var tileViewItem = new RadTileViewItem();
            tileViewItem.Header = "Test test";
            tileViewItem.TileState = TileViewItemState.Minimized;
 
            tileView.Items.Add(tileViewItem);
 
        }
	}

Let me know if you can reproduce it like this.

Thanks,
Adrian
0
Zarko
Telerik team
answered on 07 Apr 2011, 02:44 PM
Hello Adrian,

 Thank you for the bug report. I looked into it and there was a small problem which will be fixed in our next internal build. For now if you are going to use only one item you could change the MinimizedItemsPosition to Right and I couldn't find a problem when there are more than one items:

void tileView_Loaded(object sender, RoutedEventArgs e)
{
    var tileViewItem = new RadTileViewItem();
    tileViewItem.Header = "Test test";
    tileViewItem.TileState = TileViewItemState.Minimized;
 
    tileView.Items.Add(tileViewItem);
 
    var tileViewItem2 = new RadTileViewItem();
    tileViewItem2.Header = "Test 2";
    tileViewItem2.TileState = TileViewItemState.Minimized;
 
    tileView.Items.Add(tileViewItem2);
}
With this code everything was working fine.
I've updated your telerik account and if you have further questions feel free to ask.

Regards,
Zarko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ken
Top achievements
Rank 1
answered on 07 Apr 2011, 02:48 PM
Thanks for the quick help. However I can't change the position as it would look weird from my current UI point of view. I guess I'll wait for the next build.

Cheers,
Adrian
Tags
TileView
Asked by
Ken
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Ken
Top achievements
Rank 1
Share this question
or