using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;

namespace VIZ.Framework.WpfTest
{
    public class Test : ModelBase
    {
        private double _value;

        public double Value
        {
            get { return _value; }
            set
            {
                _value = value;
                this.RaisePropertyChanged(nameof(Value));
                Debug.WriteLine(_value);
            }
        }
    }

    /// <summary>
    /// NumberBoxTest.xaml 的交互逻辑
    /// </summary>
    public partial class NumberBoxTest : UserControl
    {
        public NumberBoxTest()
        {
            InitializeComponent();

            this.Test = new Test();
            this.DataContext = this.Test;
        }

        private Test Test;

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Test.Value = 102;
        }
    }
}
