This is a migrated thread and some comments may be shown as answers.

ImageButton broken in WP8

3 Answers 42 Views
ImageButton
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin
Top achievements
Rank 1
Martin asked on 07 Nov 2012, 01:00 PM

I got WP7 project using WP7 version of telerik libraries. I've created duplicate project that I migrated to WP8 and referenced the new WP8 Telerik libraries. Everything so far works as expected, but ImageButton is broken - the picture is positioned far to right.

See the picture, on the left is WP7 version with right image button, on the left the same XAML in a project refrencing WP8 Telerik libraries.

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 07 Nov 2012, 01:25 PM
Hi Martin,

When porting projects to WP8, you should have in mind that not everything will look the same in both WP7 & WP8 and this is valid not only for the native controls but for Telerik's as well. For the ImageButton, there is a difference in the color for the pressed state of the button and also in the margins. You should be able to fix the look of you application by correcting the margins by 12 pixels in all directions. If this information is not enough, please send us some code, so I can tell you exactly what adjustments you need to display the button correctly.

All the best,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Martin
Top achievements
Rank 1
answered on 07 Nov 2012, 01:42 PM

Just discovered the root of the problem - in WP8 the ImageButton uses inner 12px Margin, which is not in WP7 version (0px).
<Grid Margin="{StaticResource PhoneTouchTargetOverhang}">

Also in WP7 the button reacts when releasing the button, but in WP8 it reacts when pressed, even without releasing.

This should be fixed in my opinion so other developers won't have problems when moving from WP7 to WP8.

0
Todor
Telerik team
answered on 08 Nov 2012, 07:39 AM
Hi Martin,

According to the Design Guidelines by Microsoft it is recommended that all controls have this PhoneTouchTargetOverhang as Margin since it provides better user experience and decrease the chance of accidentally pressing incorrect button if they are adjacent. I agree we should have added it before the very first release of RadImageButton, but we haven't and we had requests that it should be added. We decided that it will be better if we add this only for the WP8 release, because as I mentioned in my previous post it is expected that there will be some adjustments necessary when porting your app from WP7 to WP8. Like I said the change is not so major, there are just some margins that need to be adjusted.

Please accept my apologies for the inconvenience caused.

Greetings,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ImageButton
Asked by
Martin
Top achievements
Rank 1
Answers by
Todor
Telerik team
Martin
Top achievements
Rank 1
Share this question
or