<ResourceDictionary
    x:ClassModifier="internal"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ControlTheme TargetType="NumericUpDown" x:Key="{x:Type NumericUpDown}">
        <Setter Property="Background" Value="{DynamicResource MainBackgroundColor}" />
        <Setter Property="BorderBrush" Value="{DynamicResource MainBorderColor}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="4" />
        <Setter Property="Template">
            <ControlTemplate>
                <DataValidationErrors>
                    <ButtonSpinner
                        AllowSpin="{TemplateBinding AllowSpin}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
                        CornerRadius="{TemplateBinding CornerRadius}"
                        HorizontalContentAlignment="Stretch"
                        IsTabStop="False"
                        MinWidth="0"
                        Name="PART_Spinner"
                        Padding="0"
                        ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
                        VerticalContentAlignment="Stretch">
                        <TextBox
                            AcceptsReturn="False"
                            Background="Transparent"
                            BorderThickness="0"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            InnerLeftContent="{Binding InnerLeftContent, RelativeSource={RelativeSource TemplatedParent}}"
                            InnerRightContent="{Binding InnerRightContent, RelativeSource={RelativeSource TemplatedParent}}"
                            IsReadOnly="{TemplateBinding IsReadOnly}"
                            Margin="4"
                            MinWidth="20"
                            Name="PART_TextBox"
                            Padding="{TemplateBinding Padding}"
                            ScrollViewer.VerticalScrollBarVisibility="Disabled"
                            Text="{TemplateBinding Text}"
                            TextAlignment="{TemplateBinding TextAlignment}"
                            TextWrapping="NoWrap"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Watermark="{TemplateBinding Watermark}" />
                    </ButtonSpinner>
                </DataValidationErrors>
            </ControlTemplate>
        </Setter>
    </ControlTheme>
</ResourceDictionary>