Philipp Heenemann
a8b91f4ee6
Updated the existing C# code into a more modern, imperative and top-level statements style. This involves shortening the code by removing unnecessary parts like additional brackets and explicit namespace declarations. It's done to improve clarity and readability.
19 lines
514 B
C#
19 lines
514 B
C#
using Avalonia;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace SPTInstaller.Behaviors;
|
|
|
|
public class SpanBehavior : AvaloniaObject
|
|
{
|
|
public static readonly AttachedProperty<bool> SpanProperty = AvaloniaProperty.RegisterAttached<SpanBehavior, Interactive, bool>("Span");
|
|
|
|
public static void SetSpan(AvaloniaObject element, bool value)
|
|
{
|
|
element.SetValue(SpanProperty, value);
|
|
}
|
|
|
|
public static bool GetSpan(AvaloniaObject element)
|
|
{
|
|
return element.GetValue(SpanProperty);
|
|
}
|
|
} |