0

I am writing a Windows 10 universal app in C# and i want to create a tile with a specific text on it that can change. Therefore I used the sample code form microsoft MSDN (the second one). But this does not work for all tiles, only the medium one shows the text "medium" on in, the others have just the app logo on it. I wonder what else is needed to force the other tiles to update.

This is the code I used to make the tile update:

        public static void updateTile(){
        TileContent content = new TileContent() {
            Visual = new TileVisual() {
                TileSmall = new TileBinding() {
                    Content = new TileBindingContentAdaptive() {
                        Children = {
                            new TileText() { Text = "Small" }
                        }
                    }
                },
                TileMedium = new TileBinding() {
                    Content = new TileBindingContentAdaptive() {
                        Children = {
                            new TileText() { Text = "Medium" }
                        }
                    }
                },
                TileWide = new TileBinding() {
                    Content = new TileBindingContentAdaptive() {
                        Children = {
                            new TileText() { Text = "Wide" }
                        }
                    }
                },
                TileLarge = new TileBinding() {
                    Content = new TileBindingContentAdaptive() {
                        Children = {
                            new TileText() { Text = "Large" }
                        }
                    }
                }
            }
        };


        // And then update the primary tile
        TileUpdateManager.CreateTileUpdaterForApplication().Update(new TileNotification(content.GetXml()));
    }
Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Alex S.
  • 31
  • 1
  • 6
  • Are you making sure that the solution does a clean, build and deploy? This would prevent the tiles from updating... Pretty sure... – DotNetRussell Jul 19 '16 at 16:34
  • I tried clean all, build an deploy with the same result on my PC but on my W10M Phone it works..... very strange. – Alex S. Jul 19 '16 at 18:34
  • Make sure that you're actually building and deploying for each. UWP settings shipped messed up. Look at your configuration manager and make sure that your specific build (yes it's also platform specific) is setup to build and deploy – DotNetRussell Jul 19 '16 at 18:35
  • Your code is right and it should be able to work. When I tested on my PC, it works well. I'm using OS Build 10586.494, Version 1511. I'd suggest you uninstall your app firstly then rebuild and deploy your project. Or you can create a new blank project to test if `updateTile` works. – Jay Zuo Jul 20 '16 at 05:36

0 Answers0