locked
Alignment problem with Hyperlink button

    Question

  • I have a Hyperlink and button in a grid layout control in XAML. Both have the same margin starting 120 pixels from left. But as you see in the picture, the Hyperlink control is not aligned exactly 120 pixels from the left. The button control looks okay.

    Is there a reason why the behavior is different for both the controls?

    Sunday, February 16, 2014 7:56 PM

Answers

  • the default template of the Hyperlink button contains more margins. you need to set the margins in xaml to fix it. even then i am not quiet sure it will total align to the left. if not you can create a custom template for it.

    what is good to know there is a style for the Button to that removes the border. TextButtonStyle its called.


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Sunday, February 16, 2014 8:25 PM