Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
305
LiveTile text center alignment problem
posted

Hello,

I am attempting to set the alignment of text in a LiveTile object to be in the center, but it only works if the LiveTile object does not have badges.
I have uploaded an example image. It's visible that there are too many unnecessary spaces between the text and the badge. It seems like the text is always centered to the left even though the alignment is set to center.


This is the code I use:

LiveTile liveTile = tileGroup.Tiles.AddLiveTile(item.ID);
liveTile.CurrentSize = (TileSize)item.TileSize;

LiveTileFrameMedium mediumFrame = liveTile.DefaultView.MediumFrames.Add();
TileMediumImage mediumContent = new TileMediumImage();
Utils.SetImageAsync(tileView, image => mediumContent.Image.AllResolutions.Image = image, item.OpenEntityAction.IconProvider);
mediumContent.Image.Scaling = ImageScaling.ScaleToFit;
mediumFrame.Content = mediumContent;
liveTile.Logo.ShortName = item.Transl;

Could you please help me to achieve my goal?

Parents Reply Children