using System.Windows.Input; using Avalonia; using FluentAvalonia.UI.Controls; namespace Artemis.UI.Shared.AttachedProperties; /// /// Helper properties for working with NumberBoxes. /// public class NumberBoxAssist : AvaloniaObject { /// /// Identifies the Avalonia attached property. /// /// Provide an derived object or binding. public static readonly AttachedProperty SuffixTextProperty = AvaloniaProperty.RegisterAttached("SuffixText", typeof(NumberBox)); /// /// Identifies the Avalonia attached property. /// /// Provide an derived object or binding. public static readonly AttachedProperty PrefixTextProperty = AvaloniaProperty.RegisterAttached("PrefixText", typeof(NumberBox)); /// /// Accessor for Attached property . /// public static void SetSuffixText(AvaloniaObject element, string value) { element.SetValue(SuffixTextProperty, value); } /// /// Accessor for Attached property . /// public static string GetSuffixText(AvaloniaObject element) { return element.GetValue(SuffixTextProperty); } /// /// Accessor for Attached property . /// public static void SetPrefixText(AvaloniaObject element, string value) { element.SetValue(PrefixTextProperty, value); } /// /// Accessor for Attached property . /// public static string GetPrefixText(AvaloniaObject element) { return element.GetValue(PrefixTextProperty); } }