add new demo view which can change the property
This commit is contained in:
@@ -1,8 +1,50 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Ursa.Controls;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public class NumericUpDownDemoViewModel: ObservableObject
|
||||
public partial class NumericUpDownDemoViewModel : ObservableObject
|
||||
{
|
||||
|
||||
|
||||
[ObservableProperty] private uint _Value;
|
||||
[ObservableProperty] private string _FontFamily = "Consolas";
|
||||
[ObservableProperty] private bool _AllowDrag = false;
|
||||
[ObservableProperty] private bool _IsReadOnly = false;
|
||||
|
||||
[ObservableProperty] private Array _Array_HorizontalContentAlignment;
|
||||
[ObservableProperty] private HorizontalAlignment _HorizontalContentAlignment = HorizontalAlignment.Center;
|
||||
[ObservableProperty] private object? _InnerLeftContent = "obj:0x";
|
||||
[ObservableProperty] private string _Watermark = "Water mark showed";
|
||||
[ObservableProperty] private string _FormatString = "x8";
|
||||
[ObservableProperty] private Array _Array_ParsingNumberStyle;
|
||||
[ObservableProperty] private NumberStyles _ParsingNumberStyle = NumberStyles.AllowHexSpecifier;
|
||||
[ObservableProperty] private bool _AllowSpin = true;
|
||||
[ObservableProperty] private bool _ShowButtonSpinner = true;
|
||||
|
||||
[ObservableProperty] private UInt32 _Maximum = UInt32.MaxValue;
|
||||
[ObservableProperty] private UInt32 _Minimum = UInt32.MinValue;
|
||||
[ObservableProperty] private UInt32 _Step = 1;
|
||||
|
||||
[ObservableProperty] private bool _IsEnable = true;
|
||||
|
||||
|
||||
public NumericUpDownDemoViewModel()
|
||||
{
|
||||
Array_HorizontalContentAlignment = Enum.GetValues(typeof(HorizontalAlignment));
|
||||
Array_ParsingNumberStyle = Enum.GetValues(typeof(NumberStyles));
|
||||
NumericUIntUpDown numericUIntUpDown;
|
||||
TextBox textBox;
|
||||
|
||||
}
|
||||
|
||||
partial void OnValueChanging(uint oldValue, uint newValue)
|
||||
{
|
||||
Console.WriteLine(oldValue);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user