chore: add avalonia Slider demo.
This commit is contained in:
1 parent
d81d99d0e4
commit
b4734cda5f
10 files changed
+723
-2
No files matched your search
@@ -0,0 +1,90 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="HandyControlDemo.UserControl.SliderDemo"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ScrollViewer>
|
||||
<hc:UniformSpacingPanel Margin="32"
|
||||
Orientation="Horizontal"
|
||||
Spacing="32"
|
||||
ClipToBounds="False"
|
||||
ChildWrapping="Wrap">
|
||||
<hc:UniformSpacingPanel Orientation="Vertical"
|
||||
Spacing="32">
|
||||
<Slider Width="400"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="1"
|
||||
Maximum="10"
|
||||
Value="8" />
|
||||
<Slider Width="400"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="1"
|
||||
Maximum="10"
|
||||
Value="3"
|
||||
IsEnabled="False" />
|
||||
<Slider Width="400"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="5"
|
||||
Maximum="100"
|
||||
TickPlacement="TopLeft"
|
||||
Value="10" />
|
||||
<Slider Width="400"
|
||||
hc:TipElement.IsVisible="True"
|
||||
hc:TipElement.Placement="Top"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100"
|
||||
Value="60"
|
||||
TickFrequency="10"
|
||||
TickPlacement="BottomRight" />
|
||||
<Slider Width="400"
|
||||
hc:TipElement.IsVisible="True"
|
||||
hc:TipElement.Placement="Bottom"
|
||||
hc:TipElement.StringFormat="N2"
|
||||
TickFrequency="1"
|
||||
Maximum="10"
|
||||
Value="5"
|
||||
TickPlacement="Outside" />
|
||||
</hc:UniformSpacingPanel>
|
||||
<hc:UniformSpacingPanel Spacing="32">
|
||||
<Slider Height="400"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="1"
|
||||
Maximum="10"
|
||||
Value="8"
|
||||
Orientation="Vertical" />
|
||||
<Slider Height="400"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="1"
|
||||
Maximum="10"
|
||||
Value="3"
|
||||
IsEnabled="False"
|
||||
Orientation="Vertical" />
|
||||
<Slider Height="400"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="5"
|
||||
Maximum="100"
|
||||
TickPlacement="TopLeft"
|
||||
Value="10"
|
||||
Orientation="Vertical" />
|
||||
<Slider Height="400"
|
||||
hc:TipElement.IsVisible="True"
|
||||
hc:TipElement.Placement="Right"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100"
|
||||
Value="60"
|
||||
TickFrequency="10"
|
||||
TickPlacement="BottomRight"
|
||||
Orientation="Vertical" />
|
||||
<Slider Height="400"
|
||||
hc:TipElement.IsVisible="True"
|
||||
hc:TipElement.Placement="Left"
|
||||
hc:TipElement.StringFormat="N2"
|
||||
TickFrequency="1"
|
||||
Maximum="10"
|
||||
Value="5"
|
||||
TickPlacement="Outside"
|
||||
Orientation="Vertical" />
|
||||
</hc:UniformSpacingPanel>
|
||||
</hc:UniformSpacingPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class SliderDemo : Avalonia.Controls.UserControl
|
||||
{
|
||||
public SliderDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user