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