Bug Report (2010_Q3) Another Null Reference

2 posts, 0 answers
  1. Alex Fan
    Alex Fan avatar
    39 posts
    Member since:
    Jul 2009

    Posted 07 Mar 2011 Link to this post


    I just find another case that will cause Null Reference, please reuse the code in my previous post
    but this time it is to do with "PreservePositionWhenMaximized" property

    In the code, there is a tile view model collection in the main view model to generate all tiles. First please remove the binding to TileState property to demonstrate this is an unrelated new bug. Then please set PreservePositionWhenMaximized="true" in xaml and add a button that will regenerate different view model collection (in my case i always create a new collection with 4 tile view models), you will find that:
    1, if all current tiles are restored, clicking the button will be fine
    2, if first tile is maximized, clicking the button is also fine
    3, if not-first tile is maximized, clicking the button will raise NullReferenceException

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 10 Mar 2011 Link to this post

    Hello Alex Fan,

    Thank you for the bug report. This issue is present in the older versions of the RadTileView but is fixed in the Q1 Beta. The problem is again related to the MaximizedItem and an easy work around is to set it to null before you change the view model collection:
    this.myTileView.MaximizedItem = null;
    this.DataContext = new MainViewModel(4);

    Best wishes,
    Petar Mladenov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft R3 2016 release webinar banner
Back to Top