Files
Ursa.Avalonia/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml
2024-01-14 23:28:58 +08:00

27 lines
1.3 KiB
XML

<UserControl
x:Class="Ursa.Demo.Pages.NumericUpDownDemo"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Styles>
<Style Selector=":is(u|NumericUpDown)">
<Setter Property="Width" Value="240"></Setter>
</Style>
</UserControl.Styles>
<StackPanel HorizontalAlignment="Left">
<u:NumericIntUpDown Name="input" Step="1" Value="2" Watermark="Input Value" />
<TextBlock Text="{Binding #input.Value}" ></TextBlock>
<u:NumericDoubleUpDown Name="inputDouble" Step="0.5" Value="3.1" EmptyInputValue="1"></u:NumericDoubleUpDown>
<TextBlock Text="{Binding #inputDouble.Value}"></TextBlock>
<u:NumericByteUpDown Name="inputByte" Step="1" Value="3" EmptyInputValue="1"></u:NumericByteUpDown>
<TextBlock Text="{Binding #inputByte.Value}"></TextBlock>
<TextBlock Text="Drag"></TextBlock>
<u:NumericIntUpDown Step="1" Value="2" Watermark="Input Value" TextEditable="False" />
</StackPanel>
</UserControl>