Grandview Software on Wed, 14 Nov 2012 22:21:49
I'm sending Tile notifications to both wide and square tiles. I use TileWideSmallImageAndText02 and TileSquareText03, respectively. Both templates allow for 4 lines of text (the wide template also allows a header text). I'm using exactly the same text for the 4 text lines in both the wide and the square. The square tiles shows the 4 lines as expected. The wide tile shows only the first 3 lines (and the header line).
I'm using string substitution (String.Replace), so the construction looks pretty straightforward. I've included the xml below, which indicates that exactly the same text is used for both tile types.
Is anyone else getting 4 lines of text in this wide template? (Curiously, the example in http://msdn.microsoft.com/en-US/library/windows/apps/hh761491#TileWideSmallImageAndText02 shows only 3 lines of text.)
<tile> <visual> <binding template="TileWideSmallImageAndText02"> <image id="1" src="Assets/MoonImages/moon01.png" alt="|imagealt|"/> <text id="1">La Jolla</text> <text id="2">2:01 a 1.5 L</text> <text id="3">8:19 a 7.0 H</text> <text id="4">3:27 p -1.4 L</text> <text id="5">9:52 p 4.2 H</text> </binding> <binding template="TileSquareText03"> <text id="1">2:01 a 1.5 L</text> <text id="2">8:19 a 7.0 H</text> <text id="3">3:27 p -1.4 L</text> <text id="4">9:52 p 4.2 H</text> </binding> </visual> </tile>
Vicky Song on Thu, 15 Nov 2012 07:51:03
Hi Grandview Software,
I can show 4 lines of text by using the TileWideSmallImageAndText02 tile template. See the following sample code:
XmlDocument tileXML = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideSmallImageAndText02); XmlNodeList tileTextAttribute = tileXML.GetElementsByTagName("text"); tileContent.Text.ToString(); tileTextAttribute.InnerText = "1"; tileTextAttribute.InnerText = "2"; tileTextAttribute.InnerText = "3"; tileTextAttribute.InnerText = "4"; TileNotification tileNotification = new TileNotification(tileXML); tileNotification.ExpirationTime = DateTimeOffset.UtcNow.AddSeconds(10); TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);Thanks.
Grandview Software on Thu, 15 Nov 2012 13:24:18
On your tile, are all of the lines the same fontsize, or is the first one the header line? You should actually be able to show 5 lines of text; one header line and 4 body lines.
My sample xml above has 5 "text" tags; the first one shows as the header, and then only 3 body lines.
In your sample, there should be 5 elements in your tileTextAttribute list. Can you try to set tileTexAttribute and see if it appears?
Rob Caplan [MSFT] on Fri, 16 Nov 2012 07:22:00
I believe this is a documentation error and the tile supports only three lines of text plus the header. If you look the other templates they are all limited to four lines total.
Grandview Software on Sat, 17 Nov 2012 21:38:48
I was able to get the effect I wanted with a "text-wrap" template (TileWideSmallImageAndText03) and inserting Environment.Newline's to create my own individual lines (I don't need the header, just 4 lines of similarly formatted text).
It looks like the documentation is wrong (the words and xml) on many of the templates (probably all of those whose samples don't correspond to the documentation, e.g., TileWideSmallImageAndText03, which says it allows 5 lines of wrapped text).
Schimmelbart on Fri, 30 Nov 2012 16:22:47
It's not a bug, it's a feature: The last line is only shown on the lock screen if your App has the right to show its info there. This is also for other templates.
See other lastest posts
azure media services
- newbee info for on-demand streaming of SS and HLS.
- How to manage assets, storage usage counts, streaming usage counts by tenant wise in windows azure media services?
- Thumbnail generation - First frame which is not 'black'
- Azure Media Player Uncaught Error: cannot find the request in the request queue
- Azure Media Services not picking up thumbnail job