Update secondary tiles from background

5 posts, 1 answers
  1. Jonas Karlsson
    Jonas Karlsson avatar
    8 posts
    Member since:
    Nov 2009

    Posted 17 Dec 2012 Link to this post

    Hello!
    How can I update the secondary tiles from my background thread?
    My code is based on the example provided for the LiveTileHelper.
    Im trying to use the UserControls that defines the look of the tile. FrontLiveTile and BackLiveTile.
    As soon as I try to set any data in the usercontrol I get system.NullreferenceException. If i don´t get any error...
                Deployment.Current.Dispatcher.BeginInvoke(
            () =>
            {
                RadExtendedTileData extendedData = new RadExtendedTileData();
                
                FrontLiveTile frontTile = new FrontLiveTile();
                BackLiveTile backTile = new BackLiveTile();
                frontTile.SetCityName(sensorName);
                extendedData.Title = DateTime.Now.ToString();
                extendedData.Count = 1;
                extendedData.VisualElement = frontTile;
     
     
              
                Uri tileUri = new Uri("/SensorInformation.xaml?id=" + SensorID + ""UriKind.RelativeOrAbsolute);
                ShellTile tile = Telerik.Windows.Controls.LiveTileHelper.GetTile(tileUri);
     
                if (tile != null)
                {
                    LiveTileHelper.UpdateTile(tile, extendedData);
                }
     
            });
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 17 Dec 2012 Link to this post

    Hi Jonas,

    We are not aware of similar issue, so I'd like to ask you to prepare a sample project which reproduces the issue and send it to us so that we can assist you further. You can also have a look at this blog post explaining how to use LiveTileHelper with background agents and including an example project.

    All the best,
    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. Jonas Karlsson
    Jonas Karlsson avatar
    8 posts
    Member since:
    Nov 2009

    Posted 17 Dec 2012 Link to this post

    Where shall i send the test project?

    Regards,
    Jonas
  5. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 17 Dec 2012 Link to this post

    Hi Jonas,

    Just open a new support ticket and attach the project or you can use and cloud service of your choice and let us download it from there.

    All the best,
    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.
  6. Jonas Karlsson
    Jonas Karlsson avatar
    8 posts
    Member since:
    Nov 2009

    Posted 17 Dec 2012 Link to this post

    My bad....

    Forgot this little line in my usercontrol. :)
    InitializeComponent(); 

    Works now!
    Thanks,
    Jonas
Back to Top
DevCraft banner