1

I need to align password to center in PasswordBox like TextAlignment property do for TextBox, but unfortunately there is no TextAlignment property defined with PasswordBox element, In windows phone 8 i achieved this by modifying PasswordBox Template as this post -PasswordBox textalignment in WP7, But when searched for Windows Store App I found many post to regarding silverlight and wpf like This but not working for Windows store apps.

Thanks :)

Community
  • 1
  • 1
Abhishek
  • 995
  • 13
  • 28

1 Answers1

0

Include namespace:

<!-- XML Namespace mapping. -->
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"

Add the non-default control HorizontalContentAlignment to the style template.

<control HorizontalContentAlignment="horizontalAlignmentValue"/>

More info here and here

sturrockad
  • 4,460
  • 2
  • 19
  • 19