This question is locked. New answers and comments are not allowed.
Hi,
I have some troubles making my tile rendering properly.
I create a user control that contains the render of my tile (two texts aligned to the bottom right corner), but when I use it in the tile, the text is the upper left corner (and left aligned).
There is the code of my usercontrol :
Can you see my mistake and help me fix it please ?
Thanks.
I have some troubles making my tile rendering properly.
I create a user control that contains the render of my tile (two texts aligned to the bottom right corner), but when I use it in the tile, the text is the upper left corner (and left aligned).
There is the code of my usercontrol :
<
Grid
x:Name
=
"LayoutRoot"
Height
=
"346"
Width
=
"346"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
></
RowDefinition
>
<
RowDefinition
Height
=
"Auto"
></
RowDefinition
>
<
RowDefinition
Height
=
"Auto"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
TextBlock
Text
=
"Hello"
x:Name
=
"Text1"
Style
=
"{StaticResource PhoneTextExtraLargeStyle}"
Grid.Row
=
"1"
HorizontalAlignment
=
"Right"
></
TextBlock
>
<
TextBlock
Text
=
"World"
x:Name
=
"Text2"
Style
=
"{StaticResource PhoneTextHugeStyle}"
Grid.Row
=
"2"
HorizontalAlignment
=
"Right"
></
TextBlock
>
</
Grid
>
Can you see my mistake and help me fix it please ?
Thanks.
6 Answers, 1 is accepted
0
Sylvain
Top achievements
Rank 1
answered on 18 Dec 2013, 07:14 PM
Actually after few changes it's a bit weirder than that:
- If I create or update my tile in my main page (the one launched at startup) in the constructor or the onNavigatedTo, I got the tile very messy (doesn't look like it should). The purpose is to update the tile when the app is started if the tile exists.
- If I create/update it on another page when clicking on a button, everything is ok.
I'll try more things to try to see what is causing the issue. In the meantime, if it's a known issue, I'd like to know if there is a workaround.
Thanks.
- If I create or update my tile in my main page (the one launched at startup) in the constructor or the onNavigatedTo, I got the tile very messy (doesn't look like it should). The purpose is to update the tile when the app is started if the tile exists.
- If I create/update it on another page when clicking on a button, everything is ok.
I'll try more things to try to see what is causing the issue. In the meantime, if it's a known issue, I'd like to know if there is a workaround.
Thanks.
0
Hello Sylvain,
Thanks for writing.
I suspect that your tile looks wrong because you are probably using RadExtendedTileData. This is used to create tiles on Windows Phone 7. The old tiles have a size of 173 x 173. Since your user control is more than twice as big it won't be rendered correctly. Please use the new tile types as described here. Please experiment until you find one that looks best.
Finally if you change your user control size to 173 by 173 it should look ok.
Regards,
Victor
Telerik
Thanks for writing.
I suspect that your tile looks wrong because you are probably using RadExtendedTileData. This is used to create tiles on Windows Phone 7. The old tiles have a size of 173 x 173. Since your user control is more than twice as big it won't be rendered correctly. Please use the new tile types as described here. Please experiment until you find one that looks best.
Finally if you change your user control size to 173 by 173 it should look ok.
Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Adan
Top achievements
Rank 1
answered on 28 Dec 2013, 09:11 AM
I have the same Issue, I'm developing a WP8 App and I'm Using RadFlipTileData
my user control is like this
but when I use it in the tile, the text is the upper left corner like Sylvain.
I hope you can help me
Thanks!
my user control is like this
<
Grid
x:Name
=
"LayoutRoot"
>
<
StackPanel
Margin
=
"12"
>
<
TextBlock
Foreground
=
"White"
FontSize
=
"34"
Name
=
"Dowloads"
TextWrapping
=
"Wrap"
/>
<
TextBlock
Foreground
=
"White"
FontSize
=
"34"
Name
=
"Event"
TextWrapping
=
"Wrap"
/>
</
StackPanel
>
</
Grid
>
var visualElement=
new
UserControls.LiveTile();
//my UserControl
var tile = ShellTile.ActiveTiles.First();
RadFlipTileData flipTileData =
new
RadFlipTileData()
{
BackVisualElement = visualElement,
//my UserControl
IsTransparencySupported =
true
,
};
LiveTileHelper.UpdateTile(tile, flipTileData);
I hope you can help me
Thanks!
0
Hello Adan,
I have attached a project using your code but I couldn't reproduce any issues. At first the text was in the top-left corner as expected, but once I changed the alignment to center, the text is aligned as expected. Have a look and let me know what I'm missing.
Regards,
Todor
Telerik
I have attached a project using your code but I couldn't reproduce any issues. At first the text was in the top-left corner as expected, but once I changed the alignment to center, the text is aligned as expected. Have a look and let me know what I'm missing.
Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Rohit
Top achievements
Rank 1
answered on 21 Feb 2014, 04:14 AM
I'm having the same problem where if I try to create/update a tile without using a button, it causes everything to align to the top left. Is there any solution for this?
0
Hi Rohit,
Did you take a look at the project Todor has supplied?
Is it working for you?
Regards,
Deyan
Telerik
Did you take a look at the project Todor has supplied?
Is it working for you?
Regards,
Deyan
Telerik
If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.