Changing navigation to tiles after updating tiles on Windows Phone

I am posting an update for my users. After updating the fragment, I want to automatically redirect the user to a new updated page as soon as he clicks on a new tile. Is there any way to achieve this?

I can no longer pull out the server because it is a fire mechanism and forget it .

With a toast notification, I can use the following message in my notification:

<wp:Param>/Views/MyPage.xaml</wp:Param> 

But this does not work with my FlipTile update.

+4
source share
1 answer

I'm not quite sure if this is what you are looking for, but can you just replace Tile after loading the application? Like that:

 /// <summary> /// Creates or replaces a tile with a Title and a parameter /// </summary> public void replaceTile() { //ShellTile TileToFind = ShellTile.ActiveTiles.First(); string tileTitle = "Title of the Tile"; //You might want to use your Parameter from the toast here as the PageName ShellTile TileToFind = FindTile( "/PageName.xaml?parameter" ); StandardTileData NewTileData = new StandardTileData { Title = tileTitle, BackgroundImage = new Uri( "/Resources/tile_icon.png", UriKind.Relative ), Count = 0, BackTitle = "", //BackBackgroundImage = new Uri("/Resources/appicon_large.png", UriKind.Relative), BackBackgroundImage = new Uri( "", UriKind.Relative ), BackContent = "" }; // Application should always be found, since it is always the first tile (even if not on homescreen) if ( TileToFind == null ) { // Update the Application Tile with the NewTileData //TileToFind.Update( NewTileData ); //Or replace an existing (second) tile with the new, updated Tile //ShellTile alreadyExistingTile = FindTile( "/PageName.xaml?parameter" ); //if ( alreadyExistingTile != null ) //{ // alreadyExistingTile.Delete(); //} ShellTile.Create( new Uri( "/PageName.xaml?parameter=" + newParameter, UriKind.Relative ), NewTileData ); } else { TileToFind.Update( NewTileData ); }} 
0
source

Source: https://habr.com/ru/post/1483346/


All Articles