locked
Can we set default Tile Size to TileSize.Square310x310 when creating a secondary tile ? RRS feed

  • Question

  • Hello,

    I try to set the default prompted Tile size with largest one  but the app crashed complaining of bad parameter

            var secondaryTile = new SecondaryTile(MainPage.logoSecondaryTileId,
              "Title text shown on the tile",
              tileActivationArguments,
              square310x310Logo,
              TileSize.Square310x310);

    Is there any limitation forcing me to set the TileSize.Wide310x150 ?

    IF yes, means the user must choose manually the large logo in dialog...

    Txs

    -Vince


    -Vince

    Friday, November 15, 2013 2:03 PM

Answers

  • you needd to provide the right image, user need to select it in the dialog and can change it later from the start screen again

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Proposed as answer by Anne Jing Tuesday, November 19, 2013 7:01 AM
    • Marked as answer by Anne Jing Tuesday, November 26, 2013 7:59 AM
    Friday, November 15, 2013 2:25 PM
  • Yes you need to provide a wide tile if you wish to provide the square tile. The user then chooses which tile to pin.

    In vb

    Dim logo As New Uri("ms-appx:///Assets/DefaultImage.png")
    
            Dim 2ndTile As New SecondaryTile("2ndTile", "2nd", "2nd", logo, TileSize.Wide310x150)
    
                    
            2ndTile.VisualElements.Wide310x150Logo = New Uri("ms-appx:///Assets/logo2.png")
            2ndTile.VisualElements.Square310x310Logo = New Uri("ms-appx:///Assets/logo3.png")
    
            Dim isPinned As Boolean = Await CompositeTile.RequestCreateAsync()

    • Proposed as answer by Anne Jing Tuesday, November 19, 2013 7:01 AM
    • Marked as answer by Anne Jing Tuesday, November 26, 2013 7:59 AM
    Saturday, November 16, 2013 10:27 AM

All replies

  • you needd to provide the right image, user need to select it in the dialog and can change it later from the start screen again

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Proposed as answer by Anne Jing Tuesday, November 19, 2013 7:01 AM
    • Marked as answer by Anne Jing Tuesday, November 26, 2013 7:59 AM
    Friday, November 15, 2013 2:25 PM
  • Yes you need to provide a wide tile if you wish to provide the square tile. The user then chooses which tile to pin.

    In vb

    Dim logo As New Uri("ms-appx:///Assets/DefaultImage.png")
    
            Dim 2ndTile As New SecondaryTile("2ndTile", "2nd", "2nd", logo, TileSize.Wide310x150)
    
                    
            2ndTile.VisualElements.Wide310x150Logo = New Uri("ms-appx:///Assets/logo2.png")
            2ndTile.VisualElements.Square310x310Logo = New Uri("ms-appx:///Assets/logo3.png")
    
            Dim isPinned As Boolean = Await CompositeTile.RequestCreateAsync()

    • Proposed as answer by Anne Jing Tuesday, November 19, 2013 7:01 AM
    • Marked as answer by Anne Jing Tuesday, November 26, 2013 7:59 AM
    Saturday, November 16, 2013 10:27 AM
  • Hi,

    did you find a way to get it to work?

    The suggested solution does not work. Since it is set to TileSize.Wide310x150, there is no problem, but as soon as you set TileSize.Square310x310 it crashes. It does not really help to set the square 310x310 logo reference in the next line, since it already crashes on the SecondaryTile constructor call.

    Any idea? Thx

    Enrico

    Thursday, December 26, 2013 4:06 PM