feat: Add GotoTop control, style and demo.
This commit is contained in:
1 parent
550b980f54
commit
2c91527181
6 files changed
+283
No files matched your search
@@ -46,6 +46,7 @@
|
||||
[ "ButtonGroup", "ButtonGroupDemo", "Brush.ButtonGroup", "", "Button" ],
|
||||
[ "ProgressButton", "ProgressButtonDemo", "Brush.ProgressBarStatusBar8", "", "Button" ],
|
||||
[ "Card", "CardDemo", "Brush.ContactCard", "", "DataDisplay" ],
|
||||
[ "GotoTop", "GotoTopDemo", "Brush.GoToTop", "", "Interacting" ],
|
||||
[ "PinBox", "PinBoxDemo", "Brush.Ellipsis", "", "DataEntry" ],
|
||||
[ "SearchBar", "SearchBarDemo", "Brush.Search", "", "DataEntry" ],
|
||||
[ "ElementGroup", "ElementGroupDemo", "Brush.ButtonGroup", "", "Layout" ],
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
x:Class="HandyControlDemo.UserControl.GotoTopDemo"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<TransitioningContentControl>
|
||||
<Panel Height="400">
|
||||
<ScrollViewer x:Name="ScrollViewerDemo"
|
||||
Height="390"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,10,0,0">
|
||||
<Border Height="2000"
|
||||
Margin="8,0">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="50%,0%"
|
||||
EndPoint="50%,100%">
|
||||
<GradientStop Offset="0"
|
||||
Color="White" />
|
||||
<GradientStop Offset="1"
|
||||
Color="Black" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
<hc:GotoTop Animated="True"
|
||||
AutoHiding="True"
|
||||
AnimationTime="500"
|
||||
Target="{Binding #ScrollViewerDemo}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="0,0,20,20" />
|
||||
</Panel>
|
||||
</TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class GotoTopDemo : Avalonia.Controls.UserControl
|
||||
{
|
||||
public GotoTopDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user