atomui/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml
polarboy 257a2cb96e ButtonSpinner 完成
ButtonSpinner 完成
2024-08-18 15:39:36 +08:00

247 lines
12 KiB
XML

<UserControl
x:Class="AtomUI.Demo.Desktop.ShowCase.ButtonSpinnerShowCase"
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"
xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
<showcase:ShowCasePanel>
<showcase:ShowCaseItem
Title="Basic"
Description="Basic button spinner.">
<atom:ButtonSpinner Spin="HandleSpin">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
</showcase:ShowCaseItem>
<showcase:ShowCaseItem
Title="Three sizes of Input"
Description="There are three sizes of an button spinner: large (40px), default (32px) and small (24px).">
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
<atom:ButtonSpinner SizeType="Large" Spin="HandleSpin">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner SizeType="Middle" Spin="HandleSpin">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner SizeType="Small" Spin="HandleSpin">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
</StackPanel>
</showcase:ShowCaseItem>
<showcase:ShowCaseItem
Title="Variants"
Description="Variants of Input.">
<StackPanel Orientation="Vertical" Spacing="10">
<atom:ButtonSpinner Spin="HandleSpin" StyleVariant="Outline">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin" StyleVariant="Filled">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin" StyleVariant="Borderless">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
</StackPanel>
</showcase:ShowCaseItem>
<showcase:ShowCaseItem
Title="Pre / Post tab"
Description="Using pre and post tabs example.">
<StackPanel Orientation="Vertical" Spacing="10">
<atom:ButtonSpinner Spin="HandleSpin"
LeftAddOn="http://"
RightAddOn=".com"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
RightAddOn="{atom:IconProvider Kind=SettingOutlined}"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
LeftAddOn="http://"
Width="400"
HorizontalAlignment="Left"
InnerRightContent=".com">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
</StackPanel>
</showcase:ShowCaseItem>
<showcase:ShowCaseItem
Title="prefix and suffix"
Description="Add a prefix or suffix icons inside input.">
<StackPanel Orientation="Vertical" Spacing="10">
<atom:ButtonSpinner Spin="HandleSpin"
InnerLeftContent="{atom:IconProvider Kind=UserOutlined, NormalFilledColor=#D7D7D7}"
InnerRightContent="{atom:IconProvider Kind=InfoCircleOutlined, NormalFilledColor=#8C8C8C}"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
InnerLeftContent="¥"
InnerRightContent="RMB"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
InnerLeftContent="¥" InnerRightContent="RMB" IsEnabled="False"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
</StackPanel>
</showcase:ShowCaseItem>
<showcase:ShowCaseItem
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">
<atom:ButtonSpinner Spin="HandleSpin"
Status="Error"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Warning"
Width="400"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Error"
Width="400"
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Warning"
Width="400"
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
HorizontalAlignment="Left">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Error"
Width="400"
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
HorizontalAlignment="Left"
StyleVariant="Filled">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Warning"
Width="400"
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
HorizontalAlignment="Left"
StyleVariant="Filled">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Error"
Width="400"
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
HorizontalAlignment="Left"
StyleVariant="Borderless">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
<atom:ButtonSpinner Spin="HandleSpin"
Status="Warning"
Width="400"
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
HorizontalAlignment="Left"
StyleVariant="Borderless">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="床前明月光"/>
</atom:ButtonSpinner>
</StackPanel>
</showcase:ShowCaseItem>
</showcase:ShowCasePanel>
</UserControl>