feat: add control.

This commit is contained in:
rabbitism
2024-03-05 17:20:49 +08:00
parent 4542b8d955
commit 47f3bd759e
2 changed files with 23 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ using Avalonia.Media;
namespace Ursa.Controls.BackTop;
public class BackTop: Control
public class BackTop : Control
{
public static readonly AttachedProperty<bool> AttachProperty =
AvaloniaProperty.RegisterAttached<BackTop, Control, bool>("Attach");

View File

@@ -0,0 +1,22 @@
using Avalonia;
using Avalonia.Controls;
namespace Ursa.Controls;
public class BackTopButton: Button
{
public static readonly StyledProperty<Control> TargetProperty = AvaloniaProperty.Register<BackTopButton, Control>(
nameof(Target));
public Control Target
{
get => GetValue(TargetProperty);
set => SetValue(TargetProperty, value);
}
protected override void OnClick()
{
base.OnClick();
}
}