MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

PasswordBox - Set vertical alignment of reveal button

Open nicolaihenriksen opened this issue 3 years ago • 0 comments

Fix for issue mentioned here.

Setting VerticalAlignment=Center to align with PART_ClearButton (default value).

This threw me off initially, because the demo application overrides the style for PackIcon in Fields.xaml, and explicitly sets VerticalAlignment=Center. The default however is Top, which is not correct. Instead of changing it directly on the PackIcon style - which potentially is a bit too intrusive - I simply apply it directly on the PackIcon instance used in the reveal button.

Also, the HorizontalAlignment being removed was a leftover from earlier, and is no longer needed.

nicolaihenriksen avatar Sep 20 '22 08:09 nicolaihenriksen