|
|
|
@ -6,6 +6,7 @@ using Avalonia.Controls.Primitives; |
|
|
|
using Avalonia.Data; |
|
|
|
using Avalonia.Input; |
|
|
|
using Avalonia.Interactivity; |
|
|
|
using Avalonia.Layout; |
|
|
|
using Avalonia.Threading; |
|
|
|
using Avalonia.Utilities; |
|
|
|
|
|
|
|
@ -105,6 +106,19 @@ namespace Avalonia.Controls |
|
|
|
public static readonly StyledProperty<string> WatermarkProperty = |
|
|
|
AvaloniaProperty.Register<NumericUpDown, string>(nameof(Watermark)); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="HorizontalContentAlignment"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<HorizontalAlignment> HorizontalContentAlignmentProperty = |
|
|
|
ContentControl.HorizontalContentAlignmentProperty.AddOwner<NumericUpDown>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="VerticalContentAlignment"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<VerticalAlignment> VerticalContentAlignmentProperty = |
|
|
|
ContentControl.VerticalContentAlignmentProperty.AddOwner<NumericUpDown>(); |
|
|
|
|
|
|
|
private IDisposable _textBoxTextChangedSubscription; |
|
|
|
|
|
|
|
private double _value; |
|
|
|
@ -256,6 +270,25 @@ namespace Avalonia.Controls |
|
|
|
set { SetValue(WatermarkProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the horizontal alignment of the content within the control.
|
|
|
|
/// </summary>
|
|
|
|
public HorizontalAlignment HorizontalContentAlignment |
|
|
|
{ |
|
|
|
get => GetValue(HorizontalContentAlignmentProperty); |
|
|
|
set => SetValue(HorizontalContentAlignmentProperty, value); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the vertical alignment of the content within the control.
|
|
|
|
/// </summary>
|
|
|
|
public VerticalAlignment VerticalContentAlignment |
|
|
|
{ |
|
|
|
get => GetValue(VerticalContentAlignmentProperty); |
|
|
|
set => SetValue(VerticalContentAlignmentProperty, value); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes new instance of <see cref="NumericUpDown"/> class.
|
|
|
|
/// </summary>
|
|
|
|
|