Files
Ursa.Avalonia/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs
2024-07-30 18:33:30 +08:00

24 lines
591 B
C#

using Avalonia.Controls;
using System.Diagnostics;
using Ursa.Controls;
using Ursa.Demo.ViewModels;
namespace Ursa.Demo.Pages;
public partial class NumericUpDownDemo : UserControl
{
public NumericUpDownDemo()
{
InitializeComponent();
DataContext = new NumericUpDownDemoViewModel();
numd.ValueChanged += Numd_ValueChanged;
}
private void Numd_ValueChanged(object? sender, ValueChangedEventArgs<uint> e)
{
if (sender is NumericIntUpDown i)
{
Trace.WriteLine($"{i.Name} {e.OldValue} {e.NewValue}");
}
}
}