Files
elwig/Elwig/Controls/UnitTextBox.cs
Lorenz Stechauner 26d75ea3cd
All checks were successful
Test / Run tests (push) Successful in 1m43s
Controls: Use nameof(Property) instead of string
2024-07-02 11:02:07 +02:00

18 lines
623 B
C#

using System.Windows;
using System.Windows.Controls;
namespace Elwig.Controls {
public class UnitTextBox : TextBox {
public static readonly DependencyProperty UnitProperty = DependencyProperty.Register(nameof(Unit), typeof(string), typeof(UnitTextBox), new FrameworkPropertyMetadata(""));
public string Unit {
get => (string)GetValue(UnitProperty);
set => SetValue(UnitProperty, value);
}
static UnitTextBox() {
DefaultStyleKeyProperty.OverrideMetadata(typeof(UnitTextBox), new FrameworkPropertyMetadata(typeof(UnitTextBox)));
}
}
}