feat: add disable container.

This commit is contained in:
rabbitism
2024-02-15 02:50:48 +08:00
parent e286f3fece
commit 7102a63fe8
9 changed files with 87 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
using Avalonia.Metadata;
namespace Ursa.Controls;
public class DisableContainer: TemplatedControl
{
public static readonly StyledProperty<InputElement?> ContentProperty = AvaloniaProperty.Register<DisableContainer, InputElement?>(
nameof(Content));
[Content]
public InputElement? Content
{
get => GetValue(ContentProperty);
set => SetValue(ContentProperty, value);
}
public static readonly StyledProperty<object?> DisabledTipProperty = AvaloniaProperty.Register<DisableContainer, object?>(
nameof(DisabledTip));
public object? DisabledTip
{
get => GetValue(DisabledTipProperty);
set => SetValue(DisabledTipProperty, value);
}
}