This is a migrated thread and some comments may be shown as answers.

Update secondary tiles from background

4 Answers 59 Views
LiveTileHelper
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonas Karlsson
Top achievements
Rank 1
Jonas Karlsson asked on 17 Dec 2012, 10:43 AM
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);
            }
 
        });

4 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 17 Dec 2012, 12:34 PM
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.
0
Jonas Karlsson
Top achievements
Rank 1
answered on 17 Dec 2012, 12:49 PM
Where shall i send the test project?

Regards,
Jonas
0
Accepted
Todor
Telerik team
answered on 17 Dec 2012, 01:23 PM
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.
0
Jonas Karlsson
Top achievements
Rank 1
answered on 17 Dec 2012, 01:35 PM
My bad....

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

Works now!
Thanks,
Jonas
Tags
LiveTileHelper
Asked by
Jonas Karlsson
Top achievements
Rank 1
Answers by
Todor
Telerik team
Jonas Karlsson
Top achievements
Rank 1
Share this question
or