2024-06-19 18:46:29 +08:00
|
|
|
<UserControl
|
2024-08-19 12:15:57 +08:00
|
|
|
x:Class="AtomUI.Demo.Desktop.ShowCase.NumberUpDownShowCase"
|
2024-06-19 18:46:29 +08:00
|
|
|
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:atom="https://atomui.net"
|
2024-09-10 13:46:03 +08:00
|
|
|
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
|
|
|
|
2024-06-19 18:46:29 +08:00
|
|
|
mc:Ignorable="d">
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCasePanel>
|
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 12:15:57 +08:00
|
|
|
Title="Basic usage"
|
2024-08-19 15:49:11 +08:00
|
|
|
Description="Numeric-only NumberUpDown.">
|
2024-09-10 12:46:41 +08:00
|
|
|
<atom:NumericUpDown Value="3" />
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-09-10 12:46:41 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 15:49:11 +08:00
|
|
|
Title="Three sizes of NumberUpDown"
|
|
|
|
Description="There are three sizes of an Input box: large (40px), default (32px) and small (24px).">
|
|
|
|
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
2024-09-10 12:46:41 +08:00
|
|
|
<atom:NumericUpDown SizeType="Large" Value="3" />
|
|
|
|
<atom:NumericUpDown SizeType="Middle" Value="3" />
|
|
|
|
<atom:NumericUpDown SizeType="Small" Value="3" />
|
2024-08-19 15:49:11 +08:00
|
|
|
</StackPanel>
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-09-10 12:46:41 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 15:49:11 +08:00
|
|
|
Title="Variants"
|
|
|
|
Description="Variants of NumberUpDown.">
|
|
|
|
<StackPanel Orientation="Vertical" Spacing="10">
|
2024-09-10 12:46:41 +08:00
|
|
|
<atom:NumericUpDown Value="3" StyleVariant="Outline" />
|
|
|
|
<atom:NumericUpDown Value="3" StyleVariant="Filled" />
|
|
|
|
<atom:NumericUpDown Value="3" StyleVariant="Borderless" />
|
2024-08-19 15:49:11 +08:00
|
|
|
</StackPanel>
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-09-10 12:46:41 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 15:49:11 +08:00
|
|
|
Title="Pre / Post tab"
|
|
|
|
Description="Using pre and post tabs example.">
|
|
|
|
<StackPanel Orientation="Vertical" Spacing="10">
|
|
|
|
<atom:NumericUpDown LeftAddOn="http://" RightAddOn=".com" Width="400" HorizontalAlignment="Left"
|
2024-09-10 12:46:41 +08:00
|
|
|
Value="3" />
|
|
|
|
<atom:NumericUpDown RightAddOn="{atom:IconProvider Kind=SettingOutlined}" Width="400"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Value="3" />
|
2024-08-19 15:49:11 +08:00
|
|
|
<atom:NumericUpDown LeftAddOn="http://" InnerRightContent=".com" Width="400" HorizontalAlignment="Left"
|
2024-09-10 12:46:41 +08:00
|
|
|
Value="3" />
|
2024-08-19 15:49:11 +08:00
|
|
|
</StackPanel>
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-09-10 12:46:41 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 15:49:11 +08:00
|
|
|
Title="With clear icon"
|
|
|
|
Description="Input box with the remove icon, click the icon to delete everything.">
|
2024-09-10 12:46:41 +08:00
|
|
|
<atom:NumericUpDown Watermark="input with clear icon" Width="400" HorizontalAlignment="Left"
|
|
|
|
IsEnableClearButton="True" />
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-09-10 12:46:41 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 15:49:11 +08:00
|
|
|
Title="prefix and suffix"
|
|
|
|
Description="Add a prefix or suffix icons inside input.">
|
|
|
|
<StackPanel Orientation="Vertical" Spacing="10">
|
|
|
|
<atom:NumericUpDown Watermark="Enter your value"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=UserOutlined, NormalFilledColor=#D7D7D7}"
|
2024-09-10 12:46:41 +08:00
|
|
|
InnerRightContent="{atom:IconProvider Kind=InfoCircleOutlined, NormalFilledColor=#8C8C8C}" />
|
|
|
|
<atom:NumericUpDown InnerLeftContent="¥" InnerRightContent="RMB" />
|
|
|
|
<atom:NumericUpDown InnerLeftContent="¥" InnerRightContent="RMB" IsEnabled="False" />
|
2024-08-19 15:49:11 +08:00
|
|
|
</StackPanel>
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-09-10 12:46:41 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
<desktop:ShowCaseItem
|
2024-08-19 15:49:11 +08:00
|
|
|
Title="Status"
|
|
|
|
Description="Add status to Input with status, which could be error or warning.">
|
|
|
|
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
2024-09-10 12:46:41 +08:00
|
|
|
<atom:NumericUpDown Watermark="Error" Status="Error" />
|
|
|
|
<atom:NumericUpDown Watermark="Warning" Status="Warning" />
|
|
|
|
<atom:NumericUpDown Watermark="Error with prefix"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" Status="Error" />
|
|
|
|
<atom:NumericUpDown Watermark="Warning with prefix"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" Status="Warning" />
|
|
|
|
|
|
|
|
<atom:NumericUpDown Watermark="Error" Status="Error"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
|
|
|
StyleVariant="Filled" />
|
|
|
|
<atom:NumericUpDown Watermark="Warning" Status="Warning"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
|
|
|
StyleVariant="Filled" />
|
|
|
|
|
|
|
|
<atom:NumericUpDown Watermark="Error" Status="Error"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
|
|
|
StyleVariant="Borderless" />
|
|
|
|
<atom:NumericUpDown Watermark="Warning" Status="Warning"
|
|
|
|
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
|
|
|
StyleVariant="Borderless" />
|
2024-08-19 15:49:11 +08:00
|
|
|
</StackPanel>
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCaseItem>
|
2024-08-19 15:49:11 +08:00
|
|
|
|
2024-09-10 13:46:03 +08:00
|
|
|
</desktop:ShowCasePanel>
|
2024-06-19 18:46:29 +08:00
|
|
|
</UserControl>
|