0

I want to show large text (about 20 characters) on secondary tile, but on mobile screen and desktop Start menu text looks different (mobile text displayed without clipping). Is there any way to make text wrapping in tile on mobile screen?

This is how text looks on desktop:
Text on Desktop tile

This is how text looks on mobile device:
Text on Mobile device tile

Code sample:

var secondaryTile = new SecondaryTile(Id.ToString(), 
"Large large large large large text","secondary_tile_id=" + Id,
uri150X150Logo, TileSize.Square150x150)
{
    VisualElements =
    {
        Square310x310Logo = uri310X310Logo,
        Square44x44Logo = uri44X44Logo,
        Square71x71Logo = uri71X71Logo,
        Wide310x150Logo = uri310X150Logo,
        Square150x150Logo = uri150X150Logo,
        ForegroundText = ForegroundText.Dark,
        ShowNameOnSquare150x150Logo = true,
        ShowNameOnSquare310x310Logo = true,
        ShowNameOnWide310x150Logo = true,
        BackgroundColor = Colors.White   
    },               
    RoamingEnabled = false,                
};        
await secondaryTile.RequestCreateAsync();
IInspectable
  • 46,945
  • 8
  • 85
  • 181
Max S
  • 21
  • 3

1 Answers1

0

You can wrap text, there's a link describing all the features of Adaptive Tiles at Adaptive Tile Templates – Schema and Documentation however link only answers aren't allowed so here's some details for text:

<text
  lang? = string
  hint-style? = textStyle
  hint-wrap? = boolean
  hint-maxLines? = integer
  hint-minLines? = integer
  hint-align? = "left" | "center" | "right" >
  <!-- text goes here -->
</text>

There's a hint-wrap property so can make sure the text wraps, there's some examples there but also recommend the Notifications Visualiser from the Store to help create them.

RoguePlanetoid
  • 4,516
  • 7
  • 47
  • 64
  • Looks like this is a bug. Even with [Notifications Visualiser](https://www.microsoft.com/en-us/store/p/notifications-visualizer/9nblggh5xsl1) option to pin test tile to Start menu tile creates without wrapping or clipping. But on desktop tile looks great. – Max S Dec 20 '16 at 16:02
  • It's very strange. I'v used the [MS official code sample](https://github.com/Microsoft/Windows-universal-samples/blob/master/Samples/Notifications/cs/Notifications/ScenarioPages/LiveTiles/AdaptiveTemplates/TextWrap/ScenarioElement.xaml.cs) to test this case. It worked well in Emulator 14393/10586. – Xie Steven Dec 21 '16 at 09:30
  • Strange, maybe there is some kind of issue then when using this, useful to know as will also be doing something with tiles in the near future! – RoguePlanetoid Dec 21 '16 at 09:44