0
0
mirror of https://github.com/sp-tarkov/patcher.git synced 2025-02-13 02:30:46 -05:00

25 lines
726 B
C#
Raw Permalink Normal View History

using Avalonia;
using Avalonia.Controls;
namespace PatchGenerator.AttachedProperties
{
/// <summary>
/// Just a random boolean value for you to attach and use to any control.
/// </summary>
public class RandomBoolAttProp : AvaloniaObject
{
public static readonly AttachedProperty<bool> RandomBoolProperty =
AvaloniaProperty.RegisterAttached<RandomBoolAttProp, Control, bool>("RandomBool");
public static bool GetRandomBool(Control control)
{
return control.GetValue(RandomBoolProperty);
}
public static void SetRandomBool(Control control, bool value)
{
control.SetValue(RandomBoolProperty, value);
}
}
}