csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
3.3 KiB
65 lines
3.3 KiB
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:ClassModifier="internal">
|
|
<Design.PreviewWith>
|
|
<Border Padding="20">
|
|
<StackPanel Spacing="20">
|
|
<NumericUpDown Minimum="0"
|
|
Maximum="10"
|
|
Increment="0.5"
|
|
Watermark="Enter text" />
|
|
<NumericUpDown Minimum="0"
|
|
Maximum="10"
|
|
Increment="0.5"
|
|
VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
ButtonSpinnerLocation="Left"
|
|
Watermark="Enter text" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Design.PreviewWith>
|
|
|
|
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource TextControlBorderBrush}" />
|
|
<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
|
|
<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
|
|
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<ButtonSpinner Name="PART_Spinner"
|
|
Background="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
Padding="0"
|
|
MinWidth="0"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
AllowSpin="{TemplateBinding AllowSpin}"
|
|
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
|
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
|
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}">
|
|
<TextBox Name="PART_TextBox"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
Margin="-1"
|
|
Padding="{TemplateBinding Padding}"
|
|
MinWidth="0"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Watermark="{TemplateBinding Watermark}"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
Text="{TemplateBinding Text}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
AcceptsReturn="False"
|
|
TextWrapping="NoWrap" />
|
|
</ButtonSpinner>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</ControlTheme>
|
|
</ResourceDictionary>
|
|
|