add new demo view which can change the property

This commit is contained in:
heartacker
2024-03-20 20:29:15 +08:00
parent 09f345092d
commit 9684dce56b
4 changed files with 220 additions and 15 deletions

View File

@@ -1,6 +1,9 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using System;
using System.Diagnostics;
using Ursa.Controls;
using Ursa.Demo.ViewModels;
namespace Ursa.Demo.Pages;
@@ -11,5 +14,12 @@ public partial class NumericUpDownDemo : UserControl
{
InitializeComponent();
DataContext = new NumericUpDownDemoViewModel();
numd.ValueChanged += Numd_ValueChanged;
}
private void Numd_ValueChanged(object? sender, ValueChangedEventArgs<uint> e)
{
Trace.WriteLine($"{(sender as NumericUIntUpDown).Name} {e.OldValue} {e.NewValue}");
}
}