new RadFlipTileData() throws null error

4 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    23 posts
    Member since:
    Feb 2013

    Posted 22 Mar 2013 Link to this post

    For some reason the following creation of a new RadFlipTileData() is throwing a null reference error. Can someone explain why?

    RadFlipTileData rftd= new RadFlipTileData()
                    {
                        BackContent = "Title2",
                        Title = "Title",
                    };

                    LiveTileHelper.CreateOrUpdateTile(rftd, new Uri("/MainPage.xaml?Secondary=test", UriKind.Relative), true, true);

    {System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.Windows.Controls.FlipTileData..ctor()
       at Telerik.Windows.Controls.RadFlipTileData..ctor()
       at LockScreen.MainPage.pin_start_Click(Object sender, EventArgs e)}
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 25 Mar 2013 Link to this post

    Hello Jonathan,

    Thank you for writing.

    I created a simple project by using the code that you provided and didn't get the exception that you mentioned. I only got an exception when trying to use RadFlipTileData on a Windows Phone 7 emulator, but it is expected since as mentioned here these features are supported on Windows Phone 7.8 or newer. I have attached a video demonstrating the expected behavior, which you can open in your browser. If you notice that I'm missing something, please let me know. If you still get NullReferenceException, please open a new support ticket with attached sample project reproducing the undesired behavior so that we 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
  4. Jonathan
    Jonathan avatar
    23 posts
    Member since:
    Feb 2013

    Posted 06 May 2013 Link to this post

    Sorry to reopen an old post, but I ran into this problem again.

    Here's a copy of the code
    if (LiveTileHelper.AreNewTilesSupported)
                    {
                         tileFlip= new RadFlipTileData()
                            {
                                Title = selectedP.tag,
                                BackgroundImage = new Uri(selectedP.pic, UriKind.Absolute),
                                Count = (int)selectedP.Cp,
                                BackTitle = selectedP.Score.ToString() ,
                                BackContent = selectedP.Status,
                                VisualElement = container,
                            };
                    }
    and the error I get:
    {System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.Windows.Controls.FlipTileData..ctor()
       at Telerik.Windows.Controls.RadFlipTileData..ctor()
       at Cheevos.MainPage.PreviousSearch_PinUser(Object sender, ContextMenuItemSelectedEventArgs e)
       at Telerik.Windows.Controls.RadContextMenuItem.OnSelected()
       at Telerik.Windows.Controls.RadContextMenuItem.OnManipulationCompleted(ManipulationCompletedEventArgs e)
       at System.Windows.Controls.Control.OnManipulationCompleted(Control ctrl, EventArgs e)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)}

    this happens on the line: tileFlip= new RadFlipTileData()

    Note: I AM using the windows phone 7 version of the controls, but I'm testing them on a windows phone 8 emulator since the features are implemented and supported on the wp7 telerik controls.
  5. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 09 May 2013 Link to this post

    Hello Jonathan,

    Thanks for writing back and please excuse us for the delay with our answer.

    Can you please create a sample project that reproduces the exception and send it to us for further investigation?

    This will help us directly debug the code and see what goes wrong.

    Thanks for your time.

    Regards,
    Deyan
    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.
Back to Top