Windows Phone 7 Secondary Tile Crashing Pivot Page
I'm developing an app that needs to when clicked on Live Tile goes to PivotPage2.xaml the problem is I can't manage to set things right.. i can go to PivotPage1.xaml(main page) Page1.xaml (Normal Page) but when i go to PivotPage2 it crashes!

here the code :


Creating live tile:

var foundTile = ShellTile.ActiveTiles.FirstOrDefault(x => x. 
NavigationUri.ToString().Contains("state=Live"));

                 if (foundTile == null)
                {

                    var secondaryTile = new StandardTileData
                    {

                        BackgroundImage = new Uri("/Images/bolaTile.png", UriKind.Relative),

                        Title = "!FuTile",

                        Count = null,

                        BackTitle = data.ToArray()[tam].Status,


                        BackContent = texto,

                    };

                    var URINav = "/PivotPage2.xaml?state=Live";

                    ShellTile.Create(new Uri(URINav, UriKind.Relative), secondaryTile);
                }

and on Pivot page:

       protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            
            Jogo temporario = new Jogo();
            temporario = (App.Current as App).temporario;
            titulo.Title = temporario.TimeCasa.ToString() + " X " + temporario.TimeFora.ToString();
          
        }


It always seems like loading(splash screen) and then crashes with no error.. can someone help?

thanks,


Alan
Windows Phone 7 Secondary Tile Crashing Pivot Page
===

I'm developing an app that needs to when clicked on Live Tile goes to PivotPage2.xaml the problem is I can't manage to set things right.. i can go to PivotPage1.xaml(main page) Page1.xaml (Normal Page) but when i go to PivotPage2 it crashes!

here the code :


Creating live tile:

var foundTile = ShellTile.ActiveTiles.FirstOrDefault(x => x. 
NavigationUri.ToString().Contains("state=Live"));

                 if (foundTile == null)
                {

                    var secondaryTile = new StandardTileData
                    {

                        BackgroundImage = new Uri("/Images/bolaTile.png", UriKind.Relative),

                        Title = "!FuTile",

                        Count = null,

                        BackTitle = data.ToArray()[tam].Status,


                        BackContent = texto,

                    };

                    var URINav = "/PivotPage2.xaml?state=Live";

                    ShellTile.Create(new Uri(URINav, UriKind.Relative), secondaryTile);
                }

and on Pivot page:

       protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            
            Jogo temporario = new Jogo();
            temporario = (App.Current as App).temporario;
            titulo.Title = temporario.TimeCasa.ToString() + " X " + temporario.TimeFora.ToString();
          
        }


It always seems like loading(splash screen) and then crashes with no error.. can someone help?

thanks,


Alan