Exception in TileView

7 posts, 0 answers
  1. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 07 Apr 2011 Link to this post

    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
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 07 Apr 2011 Link to this post

    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
  3. DevCraft banner
  4. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 07 Apr 2011 Link to this post

    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
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 07 Apr 2011 Link to this post

    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
  6. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 07 Apr 2011 Link to this post

    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
  7. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 07 Apr 2011 Link to this post

    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
  8. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 07 Apr 2011 Link to this post

    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
Back to Top
DevCraft banner