ImageButton broken in WP8

4 posts, 0 answers
  1. Martin
    Martin avatar
    26 posts
    Member since:
    Jul 2012

    Posted 07 Nov 2012 Link to this post

    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.

  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 07 Nov 2012 Link to this post

    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.

  3. DevCraft banner
  4. Martin
    Martin avatar
    26 posts
    Member since:
    Jul 2012

    Posted 07 Nov 2012 Link to this post

    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.

  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 08 Nov 2012 Link to this post

    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.

Back to Top
DevCraft banner