Skip to content

Commit 20cb0dd

Browse files
authored
fix(controls): Fix PasswordBox various issues (#1501)
* Update PasswordBox.cs * Center buttons/icons to follow TextBox style * Update PasswordBox.xaml * Update PasswordBox.xaml * Update PasswordBox.xaml * Unify remainder
1 parent 2313df9 commit 20cb0dd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131

3232
<Thickness x:Key="PasswordBoxBorderThemeThickness">1,1,1,1</Thickness>
3333
<Thickness x:Key="PasswordBoxAccentBorderThemeThickness">0,0,0,1</Thickness>
34-
<Thickness x:Key="PasswordBoxLeftIconMargin">10,8,0,0</Thickness>
35-
<Thickness x:Key="PasswordBoxRightIconMargin">0,8,10,0</Thickness>
36-
<Thickness x:Key="PasswordBoxButtonMargin">0,5,4,0</Thickness>
34+
<Thickness x:Key="PasswordBoxLeftIconMargin">10,0,0,0</Thickness>
35+
<Thickness x:Key="PasswordBoxRightIconMargin">0,0,10,0</Thickness>
36+
<Thickness x:Key="PasswordBoxButtonMargin">0,0,4,0</Thickness>
3737
<Thickness x:Key="PasswordBoxButtonPadding">0,0,0,0</Thickness>
3838
<system:Double x:Key="PasswordBoxButtonHeight">24</system:Double>
3939
<system:Double x:Key="PasswordBoxButtonIconSize">14</system:Double>
@@ -182,7 +182,7 @@
182182
x:Name="ControlIconLeft"
183183
Grid.Column="0"
184184
Margin="{StaticResource PasswordBoxLeftIconMargin}"
185-
VerticalAlignment="Top"
185+
VerticalAlignment="Center"
186186
Content="{TemplateBinding Icon}"
187187
TextElement.FontSize="16"
188188
TextElement.Foreground="{TemplateBinding Foreground}" />
@@ -196,7 +196,7 @@
196196
x:Name="PlaceholderTextBox"
197197
Margin="0"
198198
Padding="1,0"
199-
VerticalAlignment="Top"
199+
VerticalAlignment="Center"
200200
Foreground="{DynamicResource TextControlPlaceholderForeground}"
201201
Text="{TemplateBinding PlaceholderText}" />
202202
</Grid>
@@ -210,7 +210,7 @@
210210
Margin="{StaticResource PasswordBoxButtonMargin}"
211211
Padding="{StaticResource PasswordBoxButtonPadding}"
212212
HorizontalAlignment="Center"
213-
VerticalAlignment="Top"
213+
VerticalAlignment="Center"
214214
HorizontalContentAlignment="Center"
215215
VerticalContentAlignment="Center"
216216
Appearance="Secondary"
@@ -236,7 +236,7 @@
236236
Margin="{StaticResource PasswordBoxButtonMargin}"
237237
Padding="{StaticResource PasswordBoxButtonPadding}"
238238
HorizontalAlignment="Center"
239-
VerticalAlignment="Top"
239+
VerticalAlignment="Center"
240240
HorizontalContentAlignment="Center"
241241
VerticalContentAlignment="Center"
242242
Appearance="Secondary"
@@ -258,7 +258,7 @@
258258
x:Name="ControlIconRight"
259259
Grid.Column="4"
260260
Margin="{StaticResource PasswordBoxRightIconMargin}"
261-
VerticalAlignment="Top"
261+
VerticalAlignment="Center"
262262
Content="{TemplateBinding Icon}"
263263
TextElement.FontSize="16"
264264
TextElement.Foreground="{TemplateBinding Foreground}" />

0 commit comments

Comments
 (0)