feat: add control.
This commit is contained in:
@@ -5,7 +5,7 @@ using Avalonia.Media;
|
|||||||
|
|
||||||
namespace Ursa.Controls.BackTop;
|
namespace Ursa.Controls.BackTop;
|
||||||
|
|
||||||
public class BackTop: Control
|
public class BackTop : Control
|
||||||
{
|
{
|
||||||
public static readonly AttachedProperty<bool> AttachProperty =
|
public static readonly AttachedProperty<bool> AttachProperty =
|
||||||
AvaloniaProperty.RegisterAttached<BackTop, Control, bool>("Attach");
|
AvaloniaProperty.RegisterAttached<BackTop, Control, bool>("Attach");
|
||||||
|
|||||||
22
src/Ursa/Controls/BackTop/BackTopButton.cs
Normal file
22
src/Ursa/Controls/BackTop/BackTopButton.cs
Normal 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();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user