2023-05-11 23:11:39 -04:00
|
|
|
|
using Avalonia;
|
|
|
|
|
using Avalonia.Interactivity;
|
|
|
|
|
|
2023-07-12 09:19:33 +02:00
|
|
|
|
namespace SPTInstaller.Behaviors;
|
|
|
|
|
|
|
|
|
|
public class SpanBehavior : AvaloniaObject
|
2023-05-11 23:11:39 -04:00
|
|
|
|
{
|
2023-07-12 09:19:33 +02:00
|
|
|
|
public static readonly AttachedProperty<bool> SpanProperty = AvaloniaProperty.RegisterAttached<SpanBehavior, Interactive, bool>("Span");
|
2023-05-11 23:11:39 -04:00
|
|
|
|
|
2023-07-12 09:19:33 +02:00
|
|
|
|
public static void SetSpan(AvaloniaObject element, bool value)
|
|
|
|
|
{
|
|
|
|
|
element.SetValue(SpanProperty, value);
|
|
|
|
|
}
|
2023-05-11 23:11:39 -04:00
|
|
|
|
|
2023-07-12 09:19:33 +02:00
|
|
|
|
public static bool GetSpan(AvaloniaObject element)
|
|
|
|
|
{
|
|
|
|
|
return element.GetValue(SpanProperty);
|
2023-05-11 23:11:39 -04:00
|
|
|
|
}
|
2023-07-12 09:19:33 +02:00
|
|
|
|
}
|