feat: support inner left content, fix formatting bug.
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsReadOnly="{TemplateBinding IsReadOnly}"
|
||||
TextWrapping="NoWrap"
|
||||
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
<Panel
|
||||
|
||||
@@ -44,8 +44,7 @@ public class NumericDoubleUpDown : NumericUpDownBase<double>
|
||||
|
||||
protected override bool ParseText(string? text, out double? number)
|
||||
{
|
||||
// Weird bug
|
||||
var result = double.TryParse(text, out var value);
|
||||
var result = double.TryParse(text, ParsingNumberStyle, NumberFormat, out var value);
|
||||
number = value;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public abstract class NumericUpDown : TemplatedControl
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<NumberStyles> ParsingNumberStyleProperty = AvaloniaProperty.Register<NumericUpDown, NumberStyles>(
|
||||
nameof(ParsingNumberStyle));
|
||||
nameof(ParsingNumberStyle), defaultValue: NumberStyles.Any);
|
||||
|
||||
public NumberStyles ParsingNumberStyle
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user