Skip to content

Commit b0e2f3b

Browse files
committed
When the HorizontalContentAlignment="Center" the cursor was not showing up due to the TextBox content being resized down to 0. Added a minimum width to ensure that at least the cursor will be visible.
1 parent 538ebea commit b0e2f3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
<Grid x:Name="textFieldGrid"
6363
Margin="{TemplateBinding Padding}"
6464
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
65-
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
65+
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
66+
MinWidth="1">
6667
<ScrollViewer x:Name="PART_ContentHost" Focusable="false"
6768
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
6869
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"

0 commit comments

Comments
 (0)