18 lines
		
	
	
		
			620 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			620 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)));
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |