
using System.Windows.Controls;
using System.Windows.Input;

namespace ReAct_PME.WpfUI.Framework
{
    public class NumericDecimalTextBox : TextBox
    {
        protected override void OnPreviewTextInput(TextCompositionEventArgs e)
        {
            // Autorise uniquement les chiffres
            e.Handled = !double.TryParse(e.Text, out _);
            base.OnPreviewTextInput(e);
        }
    }
}
