diff --git a/samples/ControlCatalog/Pages/TextBoxPage.xaml b/samples/ControlCatalog/Pages/TextBoxPage.xaml
index 256212eaf1..099d40b3de 100644
--- a/samples/ControlCatalog/Pages/TextBoxPage.xaml
+++ b/samples/ControlCatalog/Pages/TextBoxPage.xaml
@@ -20,7 +20,7 @@
@@ -39,8 +39,7 @@
-
-
+
resm fonts
diff --git a/src/Avalonia.Controls/Presenters/TextPresenter.cs b/src/Avalonia.Controls/Presenters/TextPresenter.cs
index 1cd7e11564..0841030aaa 100644
--- a/src/Avalonia.Controls/Presenters/TextPresenter.cs
+++ b/src/Avalonia.Controls/Presenters/TextPresenter.cs
@@ -14,8 +14,8 @@ namespace Avalonia.Controls.Presenters
o => o.CaretIndex,
(o, v) => o.CaretIndex = v);
- public static readonly StyledProperty ShowPasswordTextProperty =
- AvaloniaProperty.Register(nameof(ShowPasswordText));
+ public static readonly StyledProperty RevealPasswordTextProperty =
+ AvaloniaProperty.Register(nameof(RevealPasswordText));
public static readonly StyledProperty PasswordCharProperty =
AvaloniaProperty.Register(nameof(PasswordChar));
@@ -78,7 +78,7 @@ namespace Avalonia.Controls.Presenters
static TextPresenter()
{
AffectsRender(SelectionBrushProperty);
- AffectsMeasure(TextProperty, PasswordCharProperty, ShowPasswordTextProperty,
+ AffectsMeasure(TextProperty, PasswordCharProperty, RevealPasswordTextProperty,
TextAlignmentProperty, TextWrappingProperty, TextBlock.FontSizeProperty,
TextBlock.FontStyleProperty, TextBlock.FontWeightProperty, TextBlock.FontFamilyProperty);
@@ -87,7 +87,7 @@ namespace Avalonia.Controls.Presenters
TextBlock.FontSizeProperty.Changed, TextBlock.FontStyleProperty.Changed,
TextBlock.FontWeightProperty.Changed, TextBlock.FontFamilyProperty.Changed,
SelectionStartProperty.Changed, SelectionEndProperty.Changed,
- SelectionForegroundBrushProperty.Changed, PasswordCharProperty.Changed, ShowPasswordTextProperty.Changed
+ SelectionForegroundBrushProperty.Changed, PasswordCharProperty.Changed, RevealPasswordTextProperty.Changed
).AddClassHandler((x, _) => x.InvalidateFormattedText());
CaretIndexProperty.Changed.AddClassHandler((x, e) => x.CaretIndexChanged((int)e.NewValue));
@@ -213,10 +213,10 @@ namespace Avalonia.Controls.Presenters
set => SetValue(PasswordCharProperty, value);
}
- public bool ShowPasswordText
+ public bool RevealPasswordText
{
- get => GetValue(ShowPasswordTextProperty);
- set => SetValue(ShowPasswordTextProperty, value);
+ get => GetValue(RevealPasswordTextProperty);
+ set => SetValue(RevealPasswordTextProperty, value);
}
public IBrush SelectionBrush
@@ -435,7 +435,7 @@ namespace Avalonia.Controls.Presenters
var text = Text;
- if (PasswordChar != default(char) && !ShowPasswordText)
+ if (PasswordChar != default(char) && !RevealPasswordText)
{
result = CreateFormattedTextInternal(_constraint, new string(PasswordChar, text?.Length ?? 0));
}
diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs
index 489937147f..0e0d053d88 100644
--- a/src/Avalonia.Controls/TextBox.cs
+++ b/src/Avalonia.Controls/TextBox.cs
@@ -101,8 +101,8 @@ namespace Avalonia.Controls
public static readonly StyledProperty