NullReferenceException in IconicTileData constructor

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    5 posts
    Member since:
    Oct 2011

    Posted 12 May 2013 Link to this post

    I'm trying to use the RadIconicTileData with LiveTileHelper.Create, but it jus throws a NullReferenceException from the IconicTileData constructor. Looking at the code via Just Decompile, my guess is that these are the offending lines of code:

            Type iconicTileDataType = Type.GetType("Microsoft.Phone.Shell.IconicTileData, Microsoft.Phone");
            this.instance = iconicTileDataType.GetConstructor(new Type[0]).Invoke(null);

    In the debugger, Type.GetType("Microsoft.Phone.Shell.IconicTileData, Microsoft.Phone") returns null, so I'm guessing the following line throws. Is this a known issue? What do I need to do to get this working?

    Thanks!
    Ryan
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 16 May 2013 Link to this post

    Hi Ryan,

    Thank you for your question.

    As you may know, we have two suites: RadControls for Windows Phone 7 and RadControls for Windows Phone 8. The code that you have quoted is part of the LiveTileHelper in WP7 and its purpose is to take advantage of the new tile possibilities, introduces in WP8. This code is supposed to be executed only if a WP7 application is run on a WP8 device.

    Since this is the forum for WP8, my guess is that you have added a reference to our WP7 assembly in a WP8 project. If this is the case, I suggest you to remove the WP7 references for your WP8 projects and add the WP8 ones, as they comply with the WP8 capabilities and add new features to our controls more often than not.

    I hope this information helps. Let me know if I can assist you further.

    Regards,
    Todor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top