diff --git a/samples/BindingDemo/MainWindow.xaml b/samples/BindingDemo/MainWindow.xaml index 7fc9014b8b..3ff80069f4 100644 --- a/samples/BindingDemo/MainWindow.xaml +++ b/samples/BindingDemo/MainWindow.xaml @@ -20,22 +20,22 @@ - - - - + + + + - + - + !BooleanString !!BooleanString @@ -43,17 +43,17 @@ - + - - - @@ -93,17 +93,17 @@ - + - - + + - - + + diff --git a/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml b/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml index 2975255e8b..8734758d26 100644 --- a/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml +++ b/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml @@ -36,7 +36,7 @@ + UseFloatingPlaceholder="True"/> @@ -42,7 +42,7 @@ PlaceholderText="Password Box" Classes="revealPasswordButton" TextInputOptions.ContentType="Password" - UseFloatingPlaceholderText="True" + UseFloatingPlaceholder="True" PasswordChar="*" Text="Password" /> diff --git a/samples/Generators.Sandbox/Controls/SignUpView.xaml b/samples/Generators.Sandbox/Controls/SignUpView.xaml index 5bcb16ee53..09313705f4 100644 --- a/samples/Generators.Sandbox/Controls/SignUpView.xaml +++ b/samples/Generators.Sandbox/Controls/SignUpView.xaml @@ -18,7 +18,7 @@ x:Name="UserNameTextBox" Text="{Binding UserName}" PlaceholderText="Please, enter user name..." - UseFloatingPlaceholderText="True" /> + UseFloatingPlaceholder="True" /> - - - - - - - + + + + + + + diff --git a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs index 160ce031e2..864ba86ef0 100644 --- a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs +++ b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs @@ -97,20 +97,20 @@ namespace Avalonia.Controls public static readonly StyledProperty WatermarkProperty = PlaceholderTextProperty; /// - /// Defines the property. + /// Defines the property. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013", Justification = "We keep UseFloatingWatermarkProperty for backward compatibility.")] - public static readonly StyledProperty UseFloatingPlaceholderTextProperty = - TextBox.UseFloatingPlaceholderTextProperty.AddOwner(); + public static readonly StyledProperty UseFloatingPlaceholderProperty = + TextBox.UseFloatingPlaceholderProperty.AddOwner(); /// /// Defines the property. /// - [Obsolete("Use UseFloatingPlaceholderTextProperty instead.", false)] + [Obsolete("Use UseFloatingPlaceholderProperty instead.", false)] [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022", Justification = "Obsolete property alias for backward compatibility.")] - public static readonly StyledProperty UseFloatingWatermarkProperty = UseFloatingPlaceholderTextProperty; + public static readonly StyledProperty UseFloatingWatermarkProperty = UseFloatingPlaceholderProperty; /// /// Defines the property. @@ -307,21 +307,21 @@ namespace Avalonia.Controls set => PlaceholderText = value; } - /// - public bool UseFloatingPlaceholderText + /// + public bool UseFloatingPlaceholder { - get => GetValue(UseFloatingPlaceholderTextProperty); - set => SetValue(UseFloatingPlaceholderTextProperty, value); + get => GetValue(UseFloatingPlaceholderProperty); + set => SetValue(UseFloatingPlaceholderProperty, value); } /// - [Obsolete("Use UseFloatingPlaceholderText instead.", false)] + [Obsolete("Use UseFloatingPlaceholder instead.", false)] public bool UseFloatingWatermark { - get => UseFloatingPlaceholderText; + get => UseFloatingPlaceholder; [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012", Justification = "Obsolete property setter for backward compatibility.")] - set => UseFloatingPlaceholderText = value; + set => UseFloatingPlaceholder = value; } /// diff --git a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs index a37c3b2d53..c07d43b77c 100644 --- a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs +++ b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs @@ -881,7 +881,7 @@ namespace Avalonia.Controls { SetCurrentValue(TextProperty, String.Empty); - if (string.IsNullOrEmpty(PlaceholderText) && !UseFloatingPlaceholderText) + if (string.IsNullOrEmpty(PlaceholderText) && !UseFloatingPlaceholder) { DateTimeFormatInfo dtfi = DateTimeHelper.GetCurrentDateFormat(); _defaultText = string.Empty; diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 42aaecdda7..447a6a41fc 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -195,18 +195,18 @@ namespace Avalonia.Controls public static readonly StyledProperty WatermarkProperty = PlaceholderTextProperty; /// - /// Defines the property. + /// Defines the property. /// - public static readonly StyledProperty UseFloatingPlaceholderTextProperty = - AvaloniaProperty.Register(nameof(UseFloatingPlaceholderText)); + public static readonly StyledProperty UseFloatingPlaceholderProperty = + AvaloniaProperty.Register(nameof(UseFloatingPlaceholder)); /// /// Defines the property. /// - [Obsolete("Use UseFloatingPlaceholderTextProperty instead.", false)] + [Obsolete("Use UseFloatingPlaceholderProperty instead.", false)] [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022", Justification = "Obsolete property alias for backward compatibility.")] - public static readonly StyledProperty UseFloatingWatermarkProperty = UseFloatingPlaceholderTextProperty; + public static readonly StyledProperty UseFloatingWatermarkProperty = UseFloatingPlaceholderProperty; /// /// Defines the property. @@ -718,23 +718,23 @@ namespace Avalonia.Controls /// Gets or sets a value indicating whether the will still be shown above the /// even after a text value is set. /// - public bool UseFloatingPlaceholderText + public bool UseFloatingPlaceholder { - get => GetValue(UseFloatingPlaceholderTextProperty); - set => SetValue(UseFloatingPlaceholderTextProperty, value); + get => GetValue(UseFloatingPlaceholderProperty); + set => SetValue(UseFloatingPlaceholderProperty, value); } /// /// Gets or sets a value indicating whether the will still be shown above the /// even after a text value is set. /// - [Obsolete("Use UseFloatingPlaceholderText instead.", false)] + [Obsolete("Use UseFloatingPlaceholder instead.", false)] public bool UseFloatingWatermark { - get => UseFloatingPlaceholderText; + get => UseFloatingPlaceholder; [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012", Justification = "Obsolete property setter for backward compatibility.")] - set => UseFloatingPlaceholderText = value; + set => UseFloatingPlaceholder = value; } /// diff --git a/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml b/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml index b8914f7423..3a8db8ae36 100644 --- a/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml @@ -94,7 +94,7 @@ Padding="{TemplateBinding Padding}" PlaceholderText="{TemplateBinding PlaceholderText}" PlaceholderForeground="{TemplateBinding PlaceholderForeground}" - UseFloatingPlaceholderText="{TemplateBinding UseFloatingPlaceholderText}" + UseFloatingPlaceholder="{TemplateBinding UseFloatingPlaceholder}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" diff --git a/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml b/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml index b420d4ff01..5cd5f84204 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml @@ -10,8 +10,8 @@ Reveal Password Password Revealed - - Content + + Content @@ -239,7 +239,7 @@ - diff --git a/src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml b/src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml index e49905eff4..a38f6f912d 100644 --- a/src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml +++ b/src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml @@ -101,7 +101,7 @@ BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}" - UseFloatingPlaceholderText="{TemplateBinding UseFloatingPlaceholderText}" + UseFloatingPlaceholder="{TemplateBinding UseFloatingPlaceholder}" PlaceholderText="{TemplateBinding PlaceholderText}" PlaceholderForeground="{TemplateBinding PlaceholderForeground}" /> diff --git a/src/Avalonia.Themes.Simple/Controls/TextBox.xaml b/src/Avalonia.Themes.Simple/Controls/TextBox.xaml index 6e56e4a310..f49e6317d0 100644 --- a/src/Avalonia.Themes.Simple/Controls/TextBox.xaml +++ b/src/Avalonia.Themes.Simple/Controls/TextBox.xaml @@ -110,7 +110,7 @@ Text="{TemplateBinding PlaceholderText}"> -